This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc 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]

[Bug libc/3038] missing ifdefined check in posix/types.h


------- Additional Comments From mws at twisted-brains dot org  2006-08-13 21:01 -------
this following section is copy&paste out of libc cvs posix/sys/types.h

# ifndef __int8_t_defined
# ?define __int8_t_defined
__intN_t (8, __QI__);
__intN_t (16, __HI__);
__intN_t (32, __SI__);
__intN_t (64, __DI__);
# endif

__u_intN_t (8, __QI__);
__u_intN_t (16, __HI__);
__u_intN_t (32, __SI__);
__u_intN_t (64, __DI__);


it does a check for signed int types if maybe a redefinition would happen. it 
does no check for 
the unsigned ones.

following would be the correct implementation imho. 

# ifndef __int8_t_defined
# ?define __int8_t_defined
__intN_t (8, __QI__);
__intN_t (16, __HI__);
__intN_t (32, __SI__);
__intN_t (64, __DI__);
# endif

# ifndef __u_int8_t_defined
# ?define __u_int8_t_defined
__u_intN_t (8, __QI__);
__u_intN_t (16, __HI__);
__u_intN_t (32, __SI__);
__u_intN_t (64, __DI__);
# endif

sorry my browser sended too early :/


-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
   GCC host triplet|                            |x86_64-pc-linux-gnu
 GCC target triplet|                            |x86_64-pc-linux-gnu


http://sourceware.org/bugzilla/show_bug.cgi?id=3038

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


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