[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: [libvirt] [PATCH] Add a define for NFS_SUPER_MAGIC



On 03/03/2010 11:56 AM, Eric Blake wrote:
> According to Chris Lalancette on 3/3/2010 9:44 AM:
>> Commit 3c12a67b766cce51b47861ccde2be41de369f832 added
>> a dependency on the NFS_SUPER_MAGIC macro, which is
>> defined in linux/magic.h.  Unfortunately linux/magic.h
>> is not available in RHEL-5, and causes a compile error.
>> Just define it locally, since this is something that
>> can't change.
> 
> ACK.

Thanks, pushed.

> 
>>  #ifdef __linux__
>>  #include <sys/vfs.h>
>> -#include <linux/magic.h>
>> -#endif
>> +#ifndef NFS_SUPER_MAGIC
>> +#define NFS_SUPER_MAGIC 0x6969
>> +#endif /* NFS_SUPER_MAGIC */
>> +#endif /* __linux__ */
> 
> Style question (and yet another thing for me to add to my pending HACKING
> patch): any objections to indenting preprocessor directives to make it
> easier to track nesting?  As in:
> 
> #ifdef __linux__
> # include <sys/vfs.h>
> # ifndef NFS_SUPER_MAGIC
> #  define NFS_SUPER_MAGIC 0x6969
> # endif /* NFS_SUPER_MAGIC */
> #endif /* __linux__ */

I do it without indentation because I vaguely remember that spaces in
preprocessor directives are not standards compliant.  That may not be
true anymore, and/or I might be mis-remembering, but that's the reason.
I don't really care either way; I'm happy to indent it if that is the
agreed-upon way to do it.

-- 
Chris Lalancette


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]