linux/types.h: remove prehistoric ifndefs
PATCH 1/1 linux/types.h: remove prehistoric ifndefs
Whatever the "historical reasons" were back around 1996 when this comment was added,
git grep -E '\b_(S?SIZE|TIME|CLOCK|PTRDIFF|CADDR)_T\b'
seems to say that they are no longer relevant. Relieve the preprocessor from a little work.
--- include/linux/types.h | 27 --------------------------- 1 file changed, 27 deletions(-)
include/linux/types.h +0 -27
@@ -45,39 +45,12 @@ typedef __kernel_old_gid_t old_gid_t;typedef __kernel_loff_t loff_t ;#endif -/* -* The following typedefs are also protected by individual ifdefs for -* historical reasons: -*/ -#ifndef _SIZE_T -#define _SIZE_Ttypedef __kernel_size_t size_t ; -#endif - -#ifndef _SSIZE_T -#define _SSIZE_Ttypedef __kernel_ssize_t ssize_t ; -#endif - -#ifndef _PTRDIFF_T -#define _PTRDIFF_Ttypedef __kernel_ptrdiff_t ptrdiff_t ; -#endif - -#ifndef _TIME_T -#define _TIME_Ttypedef __kernel_time_t time_t ; -#endif - -#ifndef _CLOCK_T -#define _CLOCK_Ttypedef __kernel_clock_t clock_t ; -#endif - -#ifndef _CADDR_T -#define _CADDR_Ttypedef __kernel_caddr_t caddr_t ; -#endif /* bsd */ typedef unsigned char u_char ;
Signature · 1 line
2.1.3
Quoted 7 lines · Rasmus Villemoes
Whatever the "historical reasons" were back around 1996 when this comment was added,
git grep -E '\b_(S?SIZE|TIME|CLOCK|PTRDIFF|CADDR)_T\b'
seems to say that they are no longer relevant. Relieve the preprocessor from a little work.
You are looking in the wrong place. Check your compiler's stddef.h - things like
/usr/lib/gcc/x86_64-linux-gnu/4.9/include/stddef.h:#define _SIZE_T or
/usr/lib/llvm-3.5/lib/clang/3.5.0/include/stddef.h:#define _SIZE_T along with the things like
typedef __SIZE_TYPE__ size_t;
this sucker is protecting.