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-2011 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@
33 #if defined __need_wchar_t || defined __need_size_t \
34 || defined __need_ptrdiff_t || defined __need_NULL \
35 || defined __need_wint_t
36 /* Special invocation convention inside gcc header files. In
37 particular, gcc provides a version of <stddef.h> that blindly
38 redefines NULL even when __need_wint_t was defined, even though
39 wint_t is not normally provided by <stddef.h>. Hence, we must
40 remember if special invocation has ever been used to obtain wint_t,
41 in which case we need to clean up NULL yet again. */
43 # if !(defined _GL_STDDEF_H && defined _GL_STDDEF_WINT_T)
46 # define _GL_STDDEF_WINT_T
48 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
52 /* Normal invocation convention. */
56 /* The include_next requires a split double-inclusion guard. */
58 # @INCLUDE_NEXT@ @NEXT_STDDEF_H@
63 /* On NetBSD 5.0, the definition of NULL lacks proper parentheses. */
67 /* ISO C++ says that the macro NULL must expand to an integer constant
68 expression, hence '((void *) 0)' is not allowed in C++. */
70 /* GNU C++ has a __null macro that behaves like an integer ('int' or
71 'long') but has the same size as a pointer. Use that, to avoid
78 # define NULL ((void *) 0)
82 /* Some platforms lack wchar_t. */
87 # endif /* _GL_STDDEF_H */
88 # endif /* _GL_STDDEF_H */
89 #endif /* __need_XXX */