This is the mail archive of the cygwin-patches mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] make <sys/sysmacros.h> compatible with glibc


On Mon, Apr 04, 2011 at 04:42:26PM +0200, Corinna Vinschen wrote:
>On Apr  4 07:41, Yaakov (Cygwin/X) wrote:
>> 	* include/cygwin/types.h: Move #include <sys/sysmacros.h> to
>> 	end of header so the latter get the dev_t typedef.
>> 	* include/sys/sysmacros.h (gnu_dev_major, gnu_dev_minor,
>> 	gnu_dev_makedev): Prototype and define as inline functions.
>> 	(major, minor, makedev): Redefine in terms of gnu_dev_*.
>
>Looks good to me, except for a minor tweak...
>
>> Index: include/cygwin/types.h
>> ===================================================================
>> RCS file: /cvs/src/src/winsup/cygwin/include/cygwin/types.h,v
>> retrieving revision 1.33
>> diff -u -r1.33 types.h
>> --- include/cygwin/types.h	29 Mar 2011 10:32:40 -0000	1.33
>> +++ include/cygwin/types.h	3 Apr 2011 20:43:20 -0000
>> @@ -17,7 +17,6 @@
>>  #ifndef _CYGWIN_TYPES_H
>>  #define _CYGWIN_TYPES_H
>>  
>> -#include <sys/sysmacros.h>
>>  #include <stdint.h>
>>  #include <endian.h>
>>  
>> @@ -220,6 +219,8 @@
>>  #endif /* __INSIDE_CYGWIN__ */
>>  #endif /* _CYGWIN_TYPES_H */
>>  
>> +#include <sys/sysmacros.h>
>> +
>
>...I would move this #include into the _CYGWIN_TYPES_H guarded area,
>two lines above.
>
>Oh, btw., while you're at it, would you mind to move the
>
> #ifdef __cplusplus
> extern "C"
> {
> #endif
>
>and 
>
> #ifdef __cplusplus
> }
> #endif
>
>into the _CYGWIN_TYPES_H guarded area as well?  I just noticed that for
>the first time.  Just a matter of taste I guess, but somehow this looks
>upside down to me.

Ditto * 2.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]