http://www.cs.helsinki.fi/linux/linux-kernel/2002-02/0452.html i think it is different interface between gcc guys and kernel guys. 2009/7/13 Pei Lin <telent997@xxxxxxxxx>: > WORDSIZE define in /usr/include/bits/wordsize.h by compiler. > > In my opinion, i think why does user space use double size for kernel > space is that it is easy represented for major and minor dev number, > and in kernel space 20 bit for major and 12 bit for minor. > > 2009/7/13 SandeepKsinha <sandeepksinha@xxxxxxxxx>: >> >> ail.com> wrote: >>> >>> FYI >>> >>> /usr/include/bits/types.h >>> >>> /* Fixed-size types, underlying types depend on word size and compiler. >>> */ >>> typedef signed char __int8_t; >>> typedef unsigned char __uint8_t; >>> typedef signed short int __int16_t; >>> typedef unsigned short int __uint16_t; >>> typedef signed int __int32_t; >>> typedef unsigned int __uint32_t; >>> #if __WORDSIZE == 64 >>> typedef signed long int __int64_t; >>> typedef unsigned long int __uint64_t; >>> #elif defined __GLIBC_HAVE_LONG_LONG >>> __extension__ typedef signed long long int __int64_t; >>> __extension__ typedef unsigned long long int __uint64_t; >>> #endif >>> >>> >>> #if __WORDSIZE == 32 >>> # define __SQUAD_TYPE __quad_t >>> # define __UQUAD_TYPE __u_quad_t >>> # define __SWORD_TYPE int >>> # define __UWORD_TYPE unsigned int >>> # define __SLONG32_TYPE long int >>> # define __ULONG32_TYPE unsigned long int >>> # define __S64_TYPE __quad_t >>> # define __U64_TYPE __u_quad_t >>> /* We want __extension__ before typedef's that use nonstandard base types >>> such as `long long' in C89 mode. */ >>> # define __STD_TYPE __extension__ typedef >>> #elif __WORDSIZE == 64 >>> # define __SQUAD_TYPE long int >>> # define __UQUAD_TYPE unsigned long int >>> # define __SWORD_TYPE long int >>> # define __UWORD_TYPE unsigned long int >>> # define __SLONG32_TYPE int >>> >> >> Thats what I meant? I mean where can you see the size of dev_t to be mapping >> to unsigned long. >> Its 64 bit on both, with WORDSIZE ==32 and 64. >> >> >> Regards, >> Sandeep. >> >> >> >> >> >> >> “To learn is to change. Education is a process that changes the learner.” >> >> > -- To unsubscribe from this list: send an email with "unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx Please read the FAQ at http://kernelnewbies.org/FAQ