1 /* -*- buffer-read-only: t -*- vi: set ro: */
2 /* DO NOT EDIT! GENERATED AUTOMATICALLY! */
3 /* A substitute for POSIX 2008 <stddef.h>, for platforms that have issues.
5 Copyright (C) 2009, 2010 Free Software Foundation, Inc.
7 This program is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
12 This program is distributed in the hope that it will be useful,
13 but WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 GNU General Public License for more details.
17 You should have received a copy of the GNU General Public License
18 along with this program; if not, write to the Free Software Foundation,
19 Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
21 /* Written by Eric Blake. */
24 * POSIX 2008 <stddef.h> for platforms that have issues.
25 * <http://www.opengroup.org/susv3xbd/stddef.h.html>
29 @PRAGMA_SYSTEM_HEADER@
32 #if defined __need_wchar_t || defined __need_size_t \
33 || defined __need_ptrdiff_t || defined __need_NULL \
34 || defined __need_wint_t
35 /* Special invocation convention inside gcc header files. In
36 particular, gcc provides a version of <stddef.h> that blindly
37 redefines NULL even when __need_wint_t was defined, even though
38 wint_t is not normally provided by <stddef.h>. Hence, we must
39 remember if special invocation has ever been used to obtain wint_t,
40 in which case we need to clean up NULL yet again. */
42 # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
45 # define _GL_STDDEF_WINT_T
47 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
51 /* Normal invocation convention. */
55 /* The include_next requires a split double-inclusion guard. */
57 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
62 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
66 /* ISO C++ says that the macro NULL must expand to an integer constant
67 expression, hence '((void *) 0)' is not allowed in C++. */
69 /* GNU C++ has a __null macro that behaves like an integer ('int' or
70 'long') but has the same size as a pointer. Use that, to avoid
77 # define NULL ((void *) 0)
81 /* Some platforms lack wchar_t. */
86 # endif /* _GL_STDDEF_H */
87 # endif /* _GL_STDDEF_H */
88 #endif /* __need_XXX */