slibc
|
00001 /* Copyright (C) 2011-2012 SBA Research gGmbh 00002 00003 This file is part of the Slibc Library. 00004 00005 The Slibc Library is free software; you can redistribute it and/or 00006 modify it under the terms of the GNU Lesser General Public 00007 License as published by the Free Software Foundation; either 00008 version 2.1 of the License, or (at your option) any later version. 00009 00010 The Slibc library is distributed in the hope that it will be useful, 00011 but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 00013 Lesser General Public License for more details. 00014 00015 You should have received a copy of the GNU Lesser General Public 00016 License along with the Slibc Library; if not, see 00017 <http://www.gnu.org/licenses/>. 00018 */ 00023 // include the system-header first 00024 #include_next <stddef.h> 00025 00026 // Glibc headers often include stddef.h only to get some types. 00027 // In that case the caller defined __need_TYPE (e.g. __need_size_t). 00028 // If stddef.h is included in a normal way, it will define the macro _STDDEF_H 00029 // (Let's hope that this macro name is portable) 00030 #if defined(_STDDEF_H) && !defined(SLIBC_STDDEF_H) 00031 #define SLIBC_STDDEF_H 00032 00033 // TR 24731-1 is not available if __STDC_WANT_LIB_EXT1__ equals 0 00034 #if (!defined(__STDC_WANT_LIB_EXT1__) || (__STDC_WANT_LIB_EXT1__ != 0)) 00035 00036 // Not totally sure if this is the correct solution. 00037 // The problem is our stddef.h might get included with a 00038 // define such as __need_NULL. In that case the above stddef.h 00039 // will only define this one datatype and no size_t. 00040 // Update: should not be needed any longer since we check 00041 // whether _STDDEF_H was defined above 00042 //#define __need_size_t 00043 //#include_next <stddef.h> 00044 00045 // TR 24731-1 addition to stddef.h 00053 typedef size_t rsize_t; 00054 00055 #endif 00056 00057 #endif