This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC 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] disable __size_t macro on GNU/kFreeBSD


On Sun, 29 Jan 2012, Robert Millan wrote:
> Please consider this patch to stddef.h. GNU/kFreeBSD has the same
> problem with __size_t as FreeBSD does, since it inherits many kernel
> headers from FreeBSD.

The patch looks obvious to me, and I'll be happy to apply for
Robert if approved.  Any taker?

Gerald


2012-01-29  Robert Millan  <rmh@gnu.org>

	* ginclude/stddef.h [__FreeBSD_kernel__] (__size_t): Do not define.

Index: ginclude/stddef.h
===================================================================
--- ginclude/stddef.h	(revision 183670)
+++ ginclude/stddef.h	(working copy)
@@ -200,7 +200,7 @@
 #define ___int_size_t_h
 #define _GCC_SIZE_T
 #define _SIZET_
-#if defined (__FreeBSD__) && (__FreeBSD__ >= 5)
+#if (defined (__FreeBSD__) && (__FreeBSD__ >= 5)) || defined(__FreeBSD_kernel__)
 /* __size_t is a typedef on FreeBSD 5!, must not trash it. */
 #else
 #define __size_t


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