All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] linux/types.h: remove prehistoric ifndefs
@ 2015-06-11  9:43 Rasmus Villemoes
  2015-06-13  2:15 ` Al Viro
  0 siblings, 1 reply; 2+ messages in thread
From: Rasmus Villemoes @ 2015-06-11  9:43 UTC (permalink / raw)
  To: Andrew Morton, Rasmus Villemoes; +Cc: linux-kernel

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.

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
 include/linux/types.h | 27 ---------------------------
 1 file changed, 27 deletions(-)

diff --git a/include/linux/types.h b/include/linux/types.h
index 59698be03490..eb0533481505 100644
--- a/include/linux/types.h
+++ b/include/linux/types.h
@@ -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_T
 typedef __kernel_size_t		size_t;
-#endif
-
-#ifndef _SSIZE_T
-#define _SSIZE_T
 typedef __kernel_ssize_t	ssize_t;
-#endif
-
-#ifndef _PTRDIFF_T
-#define _PTRDIFF_T
 typedef __kernel_ptrdiff_t	ptrdiff_t;
-#endif
-
-#ifndef _TIME_T
-#define _TIME_T
 typedef __kernel_time_t		time_t;
-#endif
-
-#ifndef _CLOCK_T
-#define _CLOCK_T
 typedef __kernel_clock_t	clock_t;
-#endif
-
-#ifndef _CADDR_T
-#define _CADDR_T
 typedef __kernel_caddr_t	caddr_t;
-#endif
 
 /* bsd */
 typedef unsigned char		u_char;
-- 
2.1.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] linux/types.h: remove prehistoric ifndefs
  2015-06-11  9:43 [PATCH] linux/types.h: remove prehistoric ifndefs Rasmus Villemoes
@ 2015-06-13  2:15 ` Al Viro
  0 siblings, 0 replies; 2+ messages in thread
From: Al Viro @ 2015-06-13  2:15 UTC (permalink / raw)
  To: Rasmus Villemoes; +Cc: Andrew Morton, linux-kernel

On Thu, Jun 11, 2015 at 11:43:58AM +0200, Rasmus Villemoes wrote:
> 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.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-06-13  2:15 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-06-11  9:43 [PATCH] linux/types.h: remove prehistoric ifndefs Rasmus Villemoes
2015-06-13  2:15 ` Al Viro

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.