├── .gitignore ├── LICENSE ├── README.md ├── defines.txt └── predef ├── ctype.h ├── dirent.h ├── dlfcn.h ├── fcntl.h ├── inttypes.h ├── predef.h ├── predef ├── compiler.h ├── library.h ├── os.h └── standard.h ├── setjmp.h ├── signal.h ├── stdarg.h ├── stdbool.h ├── stdint.h ├── stdio.h ├── stdlib.h ├── string.h ├── sys ├── stat.h ├── time.h ├── timeb.h └── types.h ├── unistd.h ├── wchar.h └── wctype.h /.gitignore: -------------------------------------------------------------------------------- 1 | # CVS default ignores begin 2 | tags 3 | TAGS 4 | .make.state 5 | .nse_depinfo 6 | *~ 7 | #* 8 | .#* 9 | ,* 10 | _$* 11 | *$ 12 | *.old 13 | *.bak 14 | *.BAK 15 | *.orig 16 | *.rej 17 | .del-* 18 | *.a 19 | *.olb 20 | *.o 21 | *.obj 22 | *.so 23 | *.exe 24 | *.Z 25 | *.elc 26 | *.ln 27 | core 28 | # CVS default ignores end 29 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (C) 2005 Bjorn Reese 2 | 3 | Permission to use, copy, modify, and distribute this software for any 4 | purpose with or without fee is hereby granted, provided that the above 5 | copyright notice and this permission notice appear in all copies. 6 | 7 | THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 8 | WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 9 | MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 10 | CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 11 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | predef 2 | ====== 3 | 4 | Overview of pre-defined compiler macros for standards, compilers, operating 5 | systems, and hardware architectures. 6 | 7 | This repository contains includes that can be used to set standardized macros 8 | based on these system variables. If you are only interested in what standards, 9 | compilers, etc. define what macros (e.g. how to detect them on your own), see 10 | [the documentation in the wiki](https://github.com/natefoo/predef/wiki/) 11 | 12 | predef was originally created by [Bjorn 13 | Reese](http://sourceforge.net/u/breese/profile/) and maintained in 14 | [SourceForce](http://sourceforge.net/projects/predef/). This copy is maintained 15 | by [Nate Coraor](https://github.com/natefoo/). 16 | 17 | License 18 | ------- 19 | 20 | The original license for this project is a modified version of the MIT license, 21 | and can be found in the 22 | [LICENSE](https://github.com/natefoo/predef/blob/master/LICENSE) file. 23 | 24 | src export 25 | ---------- 26 | 27 | This repository is a cvs->git export of the [predef project on 28 | SourceForge](http://sourceforge.net/p/predef/wiki/Home/) as of September 08, 29 | 2015. I won't be attempting to synchronize past this point. 30 | 31 | The original predef repository was stored in the 32 | [src](http://predef.cvs.sourceforge.net/viewvc/predef/src/) module of the 33 | [predef CVS repository](http://predef.cvs.sourceforge.net/). I used Eric 34 | Raymond's [cvs-fast-export tool](http://www.catb.org/esr/cvs-fast-export/) to 35 | convert to git. 36 | 37 | wiki export 38 | ----------- 39 | 40 | The [doc module](http://predef.cvs.sourceforge.net/viewvc/predef/doc/) in CVS 41 | unfortunately only contained outdated Emacs Muse source files. Instead, I 42 | created and used [slurpwiki](https://github.com/natefoo/slurpwiki) to grab the 43 | [predef wiki from SourceForge](http://sourceforge.net/p/predef/wiki/Home/) with 44 | revision history and attribution. 45 | 46 | predef macros 47 | ------------- 48 | 49 | These files are work in progress. Please submit a [pull 50 | request](https://github.com/natefoo/predef/pull/new/master) to contribute. 51 | 52 | The include directory and subdirectories contains predef wrappers for common 53 | system header files. 54 | 55 | The wrappers must be included as normal header files. They define macros for 56 | each function provided by the individual system header file, and include the 57 | associated system header file. For example, instead of including ``, 58 | you should include `` which will include `` and set 59 | various macros. 60 | 61 | All wrapper files depends on `` and the associated header 62 | files directory. If single files are copied into the distribution of an 63 | application, then the following header files must be copied as well: 64 | 65 | ``` 66 | 67 | 68 | 69 | 70 | 71 | ``` 72 | 73 | Example of use 74 | -------------- 75 | 76 | Using autoconf type: 77 | 78 | ```c 79 | #include 80 | #if defined(HAVE_INTTYPES_H) 81 | #include /* strtoimax */ 82 | #else 83 | #include /* strtol */ 84 | #endif 85 | 86 | intmax_t my_atoimax(const char *text) 87 | { 88 | #if defined(HAVE_STRTOIMAX) 89 | return strtoimax(text, 0, 10); 90 | #else 91 | return strtol(text, 0, 10); 92 | #endif 93 | } 94 | ``` 95 | 96 | Using predef type: 97 | 98 | ```c 99 | #include /* strtoimax */ 100 | #if !defined(PREDEF_HEADER_INTTYPES) 101 | #include /* strtol */ 102 | #endif 103 | 104 | intmax_t my_atoimax(const char *text) 105 | { 106 | #if defined(PREDEF_FUNC_STRTOIMAX) 107 | return strtoimax(text, 0, 10); 108 | #else 109 | return strtol(text, 0, 10); 110 | #endif 111 | } 112 | ``` 113 | -------------------------------------------------------------------------------- /defines.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/natefoo/predef/eb6c42a829b53763bd2da209799bf98f5723211d/defines.txt -------------------------------------------------------------------------------- /predef/ctype.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: ctype.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_CTYPE_H 19 | #define PREDEF_CTYPE_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_CTYPE 26 | #include 27 | 28 | #if defined(PREDEF_STANDARD_XOPEN_1989) 29 | # define PREDEF_FUNC__TOLOWER 30 | # define PREDEF_FUNC__TOUPPER 31 | # define PREDEF_FUNC_ISASCII 32 | # define PREDEF_FUNC_TOASCII 33 | #endif 34 | 35 | #endif /* PREDEF_CTYPE_H */ 36 | -------------------------------------------------------------------------------- /predef/dirent.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: dirent.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_DIRENT_H 19 | #define PREDEF_DIRENT_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 26 | # define PREDEF_HEADER_DIRENT 27 | # include 28 | # define PREDEF_FUNC_CLOSEDIR 29 | # define PREDEF_FUNC_OPENDIR 30 | # define PREDEF_FUNC_READDIR 31 | # define PREDEF_FUNC_REWINDDIR 32 | # if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1995) 33 | # define PREDEF_FUNC_SEEKDIR 34 | # define PREDEF_FUNC_TELLDIR 35 | # endif 36 | # if defined(PREDEF_STANDARD_POSIX_1998) \ 37 | || (defined(PREDEF_LIBC_GNU) && (PREDEF_LIBC_GNU >= 20000) \ 38 | && (defined(__USE_POSIX) || defined(__USE_MISC))) 39 | # define PREDEF_FUNC_READDIR_R 40 | # endif 41 | #endif 42 | 43 | #endif /* PREDEF_DIRENT_H */ 44 | -------------------------------------------------------------------------------- /predef/dlfcn.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: dlfcn.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_DLFCN_H 19 | #define PREDEF_DLFCN_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_POSIX_1998) \ 26 | || (defined(PREDEF_LIBC_GNU) && (PREDEF_LIBC_GNU >= 20000)) 27 | # define PREDEF_HEADER_DLFCN 28 | # include 29 | 30 | # define PREDEF_FUNC_DLCLOSE 31 | # define PREDEF_FUNC_DLERROR 32 | # define PREDEF_FUNC_DLOPEN 33 | # define PREDEF_FUNC_DLSYM 34 | #endif 35 | 36 | #endif /* PREDEF_DLFCN_H */ 37 | -------------------------------------------------------------------------------- /predef/fcntl.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: fcntl.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_FCNTL_H 19 | #define PREDEF_FCNTL_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 26 | # define PREDEF_HEADER_FCNTL 27 | # include 28 | # define PREDEF_FUNC_CREAT 29 | # define PREDEF_FUNC_FCNTL 30 | # define PREDEF_FUNC_OPEN 31 | #endif 32 | 33 | #endif /* PREDEF_FCNTL_H */ 34 | -------------------------------------------------------------------------------- /predef/inttypes.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: inttypes.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_INTTYPES_H 19 | #define PREDEF_INTTYPES_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_C_1999) \ 26 | || defined(PREDEF_STANDARD_XOPEN_1998) \ 27 | || (defined(PREDEF_LIBC_GNU) && PREDEF_LIBC_GNU >= 20100) 28 | # define PREDEF_HEADER_INTTYPES 29 | # include 30 | 31 | # define PREDEF_FUNC_IMAXABS 32 | # define PREDEF_FUNC_IMAXDIV 33 | # define PREDEF_FUNC_STRTOIMAX 34 | # define PREDEF_FUNC_STRTOUMAX 35 | # define PREDEF_FUNC_WCSTOIMAX 36 | # define PREDEF_FUNC_WCSTOUMAX 37 | #endif 38 | 39 | #endif /* PREDEF_INTTYPES_H */ 40 | -------------------------------------------------------------------------------- /predef/predef.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: predef.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_PREDEF_H 19 | #define PREDEF_PREDEF_H 20 | 21 | /* 22 | * References: 23 | * http://predef.sourceforge.net/ 24 | * http://www.UNIX-systems.org/v3-apis.html 25 | * http://petef.port5.com/c/portability.txt 26 | */ 27 | 28 | #include 29 | #include 30 | #include 31 | #include 32 | 33 | #endif 34 | -------------------------------------------------------------------------------- /predef/predef/compiler.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: $ 4 | * 5 | * Copyright (C) 2005 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_COMPILER_H 19 | #define PREDEF_COMPILER_H 20 | 21 | /* 22 | * Borland C/C++ 23 | * 24 | * Version: 0xVRR : V = Version, RR = Revision 25 | * Example: 0x551 = Borland C++ 5.51 26 | */ 27 | #if defined(__BORLANDC__) 28 | # define PREDEF_COMPILER_BORLAND __BORLANDC__ 29 | #endif 30 | 31 | /* 32 | * Comeau C++ 33 | * 34 | * Version: VRR : V = Version, RR = Revision 35 | * Example: 230 = Comeau C++ 2.30 36 | */ 37 | #if defined(__COMO__) 38 | # if defined(__COMO_VERSION__) 39 | # define PREDEF_COMPILER_COMEAU __COMO_VERSION__ 40 | # else 41 | # define PREDEF_COMPILER_COMEAU 0 42 | # endif 43 | #endif 44 | 45 | /* 46 | * Cray C/C++ 47 | * 48 | * Version: V : V = Version 49 | * Example: ? 50 | */ 51 | #if defined(_CRAYC) 52 | # if defined(_REVISION) 53 | # define PREDEF_COMPILER_CRAY _REVISION 54 | # else 55 | # define PREDEF_COMPILER_CRAY 0 56 | # endif 57 | #endif 58 | 59 | /* 60 | * Cygwin 61 | */ 62 | #if defined(__CYGWIN__) 63 | # define PREDEF_COMPILER_CYGWIN 0 64 | #endif 65 | 66 | /* 67 | * Compaq C++ 68 | * 69 | * Version: VVRRTPPP : VV = Version, RR = Revision, T = Type, PPP = Patch 70 | * Example: 60090001 = DEC C/C++ 6.0-001 71 | */ 72 | #if defined(__DECC) || defined(__DECCXX) 73 | # if defined(__DECC_VER) 74 | # define PREDEF_COMPILER_DECC __DECC_VER 75 | # else 76 | # define PREDEF_COMPILER_DECC 0 77 | # endif 78 | #else 79 | # if defined(VAXC) || defined(__VAXC) 80 | # define PREDEF_COMPILER_DECC 0 81 | # else 82 | # if defined(__osf__) && defined(__LANGUAGE_C__) && !defined(__GNUC__) 83 | /* Workaround for old DEC C compilers */ 84 | # define PREDEF_COMPILER_DECC 0 85 | # endif 86 | # endif 87 | #endif 88 | 89 | /* 90 | * Diab C/C++ 91 | * 92 | * Version: VRPP : V = Version, R = Revision, PP = Patch 93 | * Example: 4426 = Diab C/C++ 4.4q 94 | */ 95 | #if defined(__DCC__) && defined(__VERSION_NUMBER__) 96 | # define PREDEF_COMPILER_DIAB __VERSION_NUMBER__ 97 | #endif 98 | 99 | /* 100 | * Digital Mars (Symatec C++, Zortech C++) 101 | * 102 | * Version: 0xVRP : V = Version, R = Revision, P = Patch 103 | * Example: 0x720 = Digital Mars 7.2 104 | */ 105 | #if defined(__DMC__) 106 | # define PREDEF_COMPILER_DMC __DMC__ 107 | #else 108 | # if defined(__SC__) || defined(__ZTC__) 109 | # define PREDEF_COMPILER_DMC 0 110 | # endif 111 | #endif 112 | 113 | /* 114 | * GNU C/C++ 115 | * 116 | * Version: VVRRPP : VV = Version, RR = Revision, PP = Patch 117 | * Example: 030200 = GCC 3.0.2 118 | */ 119 | #if defined(__GNUC__) 120 | # if defined(__GNUC_PATCHLEVEL__) 121 | # define PREDEF_COMPILER_GCC ((__GNUC__ * 10000) + \ 122 | (__GNUC_MINOR__ * 100) + \ 123 | (__GNUC_PATCHLEVEL__)) 124 | # else 125 | # define PREDEF_COMPILER_GCC ((__GNUC__ * 10000) + \ 126 | (__GNUC_MINOR__ * 100)) 127 | # endif 128 | #endif 129 | 130 | /* 131 | * HP ANSI C / aC++ 132 | * 133 | * Version: VVRRPP : VV = Version, RR = Revision, PP = Patch 134 | * Example: 12100 = A.01.21 135 | * 136 | * The __HP_aCC was introduced in version A.01.15 (and A.03.13), where 137 | * it is set to 1. Beginning with version A.01.21 (and A.03.25) __HP_aCC 138 | * is set as above. 139 | * 140 | * The C compiler defines the __HP_cc macro, and the C++ compiler the 141 | * __HP_aCC macro. 142 | */ 143 | #if defined(__HP_aCC) 144 | # if (__HP_aCC == 1) 145 | # define PREDEF_COMPILER_HPCC 11500 146 | # else 147 | # define PREDEF_COMPILER_HPCC __HP_aCC 148 | # endif 149 | #else 150 | # if defined(__HP_cc) 151 | # define PREDEF_COMPILER_HPCC __HP_cc 152 | # else 153 | # if (__cplusplus >= 199707L) && defined(__hpux) 154 | # define PREDEF_COMPILER_HPCC 0 155 | # endif 156 | # endif 157 | #endif 158 | 159 | /* 160 | * Intel C++ 161 | * 162 | * Version: VRP : V = Version, R = Revision, P = Patch 163 | * Example: 500 = ICC 5.0 164 | */ 165 | #if defined(__INTEL_COMPILER) 166 | # define PREDEF_COMPILER_INTEL __INTEL_COMPILER 167 | #else 168 | # if defined(__ICC) 169 | # define PREDEF_COMPILER_INTEL 0 170 | # endif 171 | #endif 172 | 173 | /* 174 | * KAI C++ 175 | * 176 | * Version: 0xVRPP : V = Version, R = Revision, PP = Patch 177 | * Example: 0x4004 = KAI C++ 4.0d 178 | * 179 | * Please note that Intel has discontinued development of the KAI C++ 180 | * compiler in spring 2002: 181 | * 182 | * http://developer.intel.com/software/products/kcc/announcement.htm 183 | */ 184 | #if defined(__KCC) 185 | # if defined(__KCC_VERSION) 186 | # define PREDEF_COMPILER_KAI __KCC_VERSION 187 | # else 188 | # define PREDEF_COMPILER_KAI 0 189 | # endif 190 | #endif 191 | 192 | /* 193 | * MinGW32 194 | */ 195 | #if defined(__MINGW32__) 196 | # define PREDEF_COMPILER_MINGW32 0 197 | #endif 198 | 199 | /* 200 | * SGI MIPSpro 201 | * 202 | * Version: VRP : V = Version, R = Revision, P = Patch 203 | * Example: 721 = MIPSpro 7.2.1 204 | */ 205 | #if (defined(sgi) || defined(__sgi)) && defined(_COMPILER_VERSION) 206 | # define PREDEF_COMPILER_MIPSPRO _COMPILER_VERSION 207 | #endif 208 | 209 | /* 210 | * Apple MPW C++ 211 | * 212 | * Version: 0xVVRR : VV = Version, RR = Revision 213 | * Example: 0x0500 = MPW C++ 5.0 214 | */ 215 | #if defined(__MRC__) 216 | # define PREDEF_COMPILER_MPW __MRC__ 217 | #else 218 | # if defined(MPW_C) || defined(MPW_CPLUS) 219 | # define PREDEF_COMPILER_MPW 0 220 | # endif 221 | #endif 222 | 223 | /* 224 | * Metrowerks CodeWarrior 225 | * 226 | * Version: 0xVRPP : V = Version, R = Revision, PP = Patch 227 | * Example: 0x2200 = Metrowerks C/C++ 2.2 228 | * 229 | * Versions prior to CodeWarrior 7 sets __MWERKS__ to 1. 230 | */ 231 | #if defined(__MWERKS__) 232 | # define PREDEF_COMPILER_MWERKS __MWERKS__ 233 | #endif 234 | 235 | /* 236 | * Norcroft C 237 | * 238 | * The __ARMCC_VERSION macro is assigned a floating-point number, 239 | * so it cannot be used by the preprocessor to compare versions. 240 | */ 241 | #if defined(__CC_NORCROFT) 242 | # define PREDEF_COMPILER_NORCROFT 0 243 | #endif 244 | 245 | /* 246 | * SCO OpenServer 247 | */ 248 | #if defined(_SCO_DS) 249 | # define PREDEF_COMPILER_SCO 0 250 | #endif 251 | 252 | /* 253 | * Sun Forte C/C++ (Workshop Pro) 254 | * 255 | * Version: 0xVRP : V = Version, R = Revision, P = Patch 256 | * Example: 0x500 = Workshop Pro 5.0 257 | */ 258 | #if defined(__SUNPRO_C) 259 | # define PREDEF_COMPILER_SUNPRO __SUNPRO_C 260 | #else 261 | # if defined(__SUNPRO_CC) 262 | # define PREDEF_COMPILER_SUNPRO __SUNPRO_CC 263 | # endif 264 | #endif 265 | 266 | /* 267 | * TenDRA 268 | */ 269 | #if defined(__TenDRA__) 270 | # define PREDEF_COMPILER_TENDRA 0 271 | #endif 272 | 273 | /* 274 | * USL C 275 | * 276 | * Version: 0xVRRYYYYMM : V = Version, RR = Revision, YYYY = Year, MM = Month 277 | * Example: 0x302199801 = USL C 3.2 278 | */ 279 | #if defined(__USLC__) 280 | # if defined(__SCO_VERSION__) 281 | # define PREDEF_COMPILER_USLC __SCO_VERSION__ 282 | # else 283 | # define PREDEF_COMPILER_USLC 0 284 | # endif 285 | #endif 286 | 287 | /* 288 | * Microsoft Visual C++ 289 | * 290 | * Version: VVRR : VV = Version, RR = Revision 291 | * Example: 1200 = Visual C++ 6.0 (compiler 12.0) 292 | */ 293 | #if defined(_MSC_VER) 294 | # define PREDEF_COMPILER_VISUALC _MSC_VER 295 | # define PREDEF_VERSION_VISUALC_6_0 1200 296 | # define PREDEF_VERSION_VISUALC_7_0 1300 297 | #endif 298 | 299 | /* 300 | * Watcom C++ 301 | * 302 | * Version: VVRR : VV = Version, RR = Revision 303 | * Example: 1050 = Watcom C++ 10.5 304 | */ 305 | #if defined(__WATCOMC__) 306 | # define PREDEF_COMPILER_WATCOM __WATCOMC__ 307 | #endif 308 | 309 | /* 310 | * IBM xlC 311 | * 312 | * Version: 0xVVRR : VV = Version, RR = Revision 313 | * Example: 0x0500 = IBM xlC 5.0 314 | */ 315 | #if defined(__xlC__) 316 | # define PREDEF_COMPILER_XLC __xlC__ 317 | #else 318 | # if defined(__IBMC__) || defined(__IBMCPP__) 319 | # define PREDEF_COMPILER_XLC 0 /* Version is decimal */ 320 | # else 321 | # if defined(_AIX) && !defined(__GNUC__) 322 | /* Workaround for old xlc */ 323 | # define PREDEF_COMPILER_XLC 0 324 | # endif 325 | # endif 326 | #endif 327 | 328 | #endif 329 | -------------------------------------------------------------------------------- /predef/predef/library.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: library.h,v 1.1 2005/11/27 14:03:10 breese Exp $ 4 | * 5 | * Copyright (C) 2005 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_LIBRARY_H 19 | #define PREDEF_LIBRARY_H 20 | 21 | #ifndef PREDEF_COMPILER_H 22 | # include 23 | #endif 24 | #ifndef PREDEF_STANDARD_H 25 | # include 26 | #endif 27 | 28 | /************************************************************************* 29 | * C Libraries 30 | */ 31 | 32 | #if defined(PREDEF_COMPILER_MWERKS) && defined(TARGET_API_MAC_CARBON) 33 | # define PREDEF_LIBC_CARBON 0 34 | /* 35 | * Although the Metrowerks compiler supports C99, the Carbon library 36 | * does not contain all C99 functions. 37 | */ 38 | # if defined(PREDEF_STANDARD_C_1999) 39 | # undef PREDEF_STANDARD_C_1999 40 | # endif 41 | #endif 42 | 43 | #if defined(__GLIBC__) 44 | # if defined(__GLIBC_MINOR__) 45 | # define PREDEF_LIBC_GNU ((__GLIBC__ * 10000) + \ 46 | (__GLIBC_MINOR__ * 100)) 47 | # else 48 | # define PREDEF_LIBC_GNU ((__GLIBC__ * 10000)) 49 | # endif 50 | #else 51 | # if defined(__GNU_LIBRARY__) 52 | /* 53 | * If __GNU_LIBRARY__ is defined, but __GLIBC__ is not we are using the 54 | * older GNU libc rather than glibc. Libc version 6 was succeeded by glibc 55 | * version 2. To enable easy chronological comparison, the PREDEF_LIBC_GNU 56 | * macro defines the libc version number to be 100 times smaller than the 57 | * version number of glibc. For example, libc version 6.0 becomes 600 and 58 | * glibc version 2.1 becomes 20100. 59 | */ 60 | # if defined(__GNU_LIBRARY_MINOR__) 61 | # define PREDEF_LIBC_GNU ((__GNU_LIBRARY__ * 100) + \ 62 | (__GNU_LIBRARY_MINOR__)) 63 | # else 64 | # define PREDEF_LIBC_GNU ((__GNU_LIBRARY__ * 100)) 65 | # endif 66 | # endif 67 | #endif 68 | 69 | #if defined(__CRTL_VER) 70 | # define PREDEF_LIBC_VMS __CRTL_VER 71 | # if (__CRTL_VER < 80000000) 72 | /* 73 | * Although the compiler supports C99 language constructs, the C 74 | * run-time library does not contain all C99 functions. 75 | * 76 | * This was the case for 70300022. Update the 80000000 value when 77 | * it has been accurately determined what version of the library 78 | * supports C99. 79 | */ 80 | # if defined(PREDEF_STANDARD_C_1999) 81 | # undef PREDEF_STANDARD_C_1999 82 | # endif 83 | # endif 84 | #endif 85 | 86 | /************************************************************************* 87 | * C++ Libraries 88 | */ 89 | 90 | #if defined(__CPPLIB_VER) 91 | # define PREDEF_LIBCXX_DINKUM __CPPLIB_VER 92 | #endif 93 | 94 | #if defined(__GLIBCXX__) 95 | # define PREDEF_LIBCXX_GNU __GLIBCXX__ 96 | #else 97 | # if defined(__GLIBCPP__) 98 | # define PREDEF_LIBCXX_GNU __GLIBCPP__ 99 | # endif 100 | #endif 101 | 102 | #if defined(PREDEF_COMPILER_VISUALC) 103 | # if defined(PREDEF_LIBCXX_DINKUM) 104 | # define PREDEF_LIBCXX_VISUALC PREDEF_LIBCXX_DINKUM 105 | # else 106 | # define PREDEF_LIBCXX_VISUALC 0 107 | # endif 108 | #endif 109 | 110 | #endif 111 | -------------------------------------------------------------------------------- /predef/predef/os.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: $ 4 | * 5 | * Copyright (C) 2005 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_OS_H 19 | #define PREDEF_OS_H 20 | 21 | #ifndef PREDEF_COMPILER_H 22 | # include 23 | #endif 24 | 25 | /************************************************************************* 26 | * Operating System 27 | */ 28 | 29 | #if defined(__amigaos__) \ 30 | || defined(AMIGA) 31 | # define PREDEF_OS_AMIGA 32 | #endif 33 | 34 | #if defined(_AIX) \ 35 | || defined(__TOS_AIX__) \ 36 | || defined(PREDEF_COMPILER_XLC) 37 | # define PREDEF_OS_AIX 38 | #endif 39 | 40 | #if defined(__BEOS__) 41 | # define PREDEF_OS_BEOS 42 | #endif 43 | 44 | #if defined(bsdi) \ 45 | || defined(__bsdi__) 46 | # define PREDEF_OS_BSDI 47 | #endif 48 | 49 | #if defined(_UNICOS) \ 50 | || defined(_CRAY) 51 | # define PREDEF_OS_CRAY 52 | #endif 53 | 54 | #if defined(DGUX) \ 55 | || defined(__DGUX__) \ 56 | || defined(__dgux__) 57 | # define PREDEF_OS_DGUX 58 | #endif 59 | 60 | #if defined(__DragonFly__) 61 | # define PREDEF_OS_DRAGONFLY 62 | #endif 63 | 64 | #if defined(__FreeBSD__) 65 | # define PREDEF_OS_FREEBSD 66 | #endif 67 | 68 | #if defined(hpux) \ 69 | || defined(__hpux) \ 70 | || defined(_HPUX_SOURCE) 71 | # define PREDEF_OS_HPUX 72 | #endif 73 | 74 | #if defined(__GNU__) 75 | # define PREDEF_OS_HURD 76 | #endif 77 | 78 | #if defined(sgi) \ 79 | || defined(__sgi) \ 80 | || defined(mips) \ 81 | || defined(_SGI_SOURCE) 82 | # define PREDEF_OS_IRIX 83 | #endif 84 | 85 | #if defined(linux) \ 86 | || defined(__linux) \ 87 | || defined(__linux__) 88 | # define PREDEF_OS_LINUX 89 | #endif 90 | 91 | #if defined(macintosh) \ 92 | || defined(Macintosh) \ 93 | || defined(__MACOS__) 94 | # define PREDEF_OS_MACINTOSH 95 | #endif 96 | 97 | #if defined(__MACOSX__) \ 98 | || (defined(__APPLE__) && defined(__MACH__)) 99 | # define PREDEF_OS_MACOSX 100 | #endif 101 | 102 | #if defined(mpeix) \ 103 | || defined(__mpexl) 104 | # define PREDEF_OS_MPEIX 105 | #endif 106 | 107 | #if defined(MSDOS) \ 108 | || defined(__MSDOS__) \ 109 | || defined(_MSDOS) \ 110 | || defined(__DOS__) 111 | # define PREDEF_OS_MSDOS 112 | #endif 113 | 114 | #if defined(__NetBSD__) 115 | # define PREDEF_OS_NETBSD 116 | #endif 117 | 118 | #if defined(__OpenBSD__) 119 | # define PREDEF_OS_OPENBSD 120 | #endif 121 | 122 | #if defined(OS2) \ 123 | || defined(_OS2) \ 124 | || defined(__OS2__) \ 125 | || defined(__TOS_OS2__) 126 | # define PREDEF_OS_OS2 127 | #endif 128 | 129 | #if defined(__osf__) \ 130 | || defined(__osf) \ 131 | || defined(PREDEF_COMPILER_DECC) 132 | /* See VMS below */ 133 | # define PREDEF_OS_OSF 134 | #endif 135 | 136 | #if defined(pyr) 137 | # define PREDEF_OS_PYRAMID 138 | #endif 139 | 140 | #if defined(__QNX__) \ 141 | || defined(__QNXNTO__) 142 | # define PREDEF_OS_QNX 143 | #endif 144 | 145 | #if defined(M_I386) \ 146 | || defined(M_XENIX) \ 147 | || defined(_SCO_C_DIALECT) \ 148 | || defined(PREDEF_COMPILER_SCO) 149 | # define PREDEF_OS_SCO 150 | #endif 151 | 152 | #if defined(_SEQUENT_) \ 153 | || defined(sequent) 154 | # define PREDEF_OS_SEQUENT 155 | #endif 156 | 157 | #if defined(sinix) 158 | # define PREDEF_OS_SINIX 159 | #endif 160 | 161 | #if defined(sun) \ 162 | || defined(__sun__) \ 163 | || defined(PREDEF_COMPILER_SUNPRO) 164 | # if defined(__SVR4) || defined(__svr4__) 165 | # define PREDEF_OS_SOLARIS 166 | # else 167 | # define PREDEF_OS_SUNOS 168 | # endif 169 | #endif 170 | 171 | #if defined(__SYMBIAN32__) 172 | # define PREDEF_OS_SYMBIAN 173 | #endif 174 | 175 | #if defined(ultrix) \ 176 | || defined(__ultrix) \ 177 | || defined(__ultrix__) 178 | # define PREDEF_OS_ULTRIX 179 | #endif 180 | 181 | 182 | /************************************************************************* 183 | * Platforms 184 | */ 185 | 186 | #if defined(VMS) \ 187 | || defined(__VMS) 188 | # undef PREDEF_OS_OSF 189 | # define PREDEF_PLATFORM_VMS 190 | # if defined(__VMS_VER) 191 | # define PREDEF_OS_VMS __VMS_VER 192 | # else 193 | # define PREDEF_OS_VMS 0 194 | # endif 195 | #endif 196 | 197 | #if defined(unix) \ 198 | || defined(__unix) \ 199 | || defined(__unix__) 200 | # define PREDEF_PLATFORM_UNIX 201 | #endif 202 | #if defined(PREDEF_OS_AIX) \ 203 | || defined(PREDEF_OS_OSF) \ 204 | || defined(PREDEF_OS_NETBSD) \ 205 | || defined(PREDEF_OS_QNX) 206 | /* 207 | * The Unix macros are not always defined on these platforms. 208 | */ 209 | # if !defined(PREDEF_PLATFORM_UNIX) 210 | # define PREDEF_PLATFORM_UNIX 211 | # endif 212 | #endif 213 | #if defined(PREDEF_COMPILER_CYGWIN) 214 | # define PREDEF_PLATFORM_UNIX 215 | #endif 216 | #if defined(AMIGA) && defined(PREDEF_COMPILER_GCC) 217 | # define PREDEF_PLATFORM_UNIX 218 | #endif 219 | 220 | #if defined(WIN32) \ 221 | || defined(_WIN32) \ 222 | || defined(__TOS_WIN__) \ 223 | || defined(PREDEF_COMPILER_VISUALC) 224 | # define PREDEF_PLATFORM_WIN32 225 | # define PREDEF_OS_WINDOWS 226 | #endif 227 | 228 | #if defined(PREDEF_OS_FREEBSD) \ 229 | || defined(PREDEF_OS_NETBSD) \ 230 | || defined(PREDEF_OS_OPENBSD) \ 231 | || defined(PREDEF_OS_BSDI) \ 232 | || defined(PREDEF_OS_DRAGONFLY) \ 233 | || defined(_BSD_SOURCE) \ 234 | || defined(_SYSTYPE_BSD) 235 | # define PREDEF_PLATFORM_BSD 236 | #endif 237 | 238 | #if defined(__sysv__) \ 239 | || defined(__SVR4) \ 240 | || defined(__svr4__) \ 241 | || defined(_SVR4_SOURCE) \ 242 | || defined(_SYSTYPE_SVR4) 243 | # define PREDEF_PLATFORM_SVR4 244 | #endif 245 | 246 | #if defined(UWIN) 247 | # define PREDEF_PLATFORM_UWIN 248 | #endif 249 | 250 | #if defined(_WINDU_SOURCE) 251 | # define PREDEF_PLATFORM_WINDU 252 | #endif 253 | 254 | #endif 255 | -------------------------------------------------------------------------------- /predef/predef/standard.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: standard.h,v 1.1 2005/11/27 14:03:10 breese Exp $ 4 | * 5 | * Copyright (C) 2005 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STANDARD_H 19 | #define PREDEF_STANDARD_H 20 | 21 | #ifndef PREDEF_COMPILER_H 22 | # include 23 | #endif 24 | 25 | /************************************************************************* 26 | * C Standards 27 | */ 28 | 29 | #define PREDEF_VERSION_C_1989 198900L 30 | #define PREDEF_VERSION_C_1990 199000L 31 | #define PREDEF_VERSION_C_1994 199409L 32 | #define PREDEF_VERSION_C_1999 199901L 33 | 34 | #if defined(__STDC_VERSION__) 35 | # if (__STDC_VERSION__ > 1) 36 | # define PREDEF_STANDARD_C __STDC_VERSION__ 37 | # else 38 | # if (PREDEF_COMPILER_SUNPRO >= 0x420) 39 | # define PREDEF_STANDARD_C PREDEF_VERSION_C_1994 40 | # else 41 | # define PREDEF_STANDARD_C PREDEF_VERSION_C_1990 42 | # endif 43 | # endif 44 | #else 45 | # if defined(__STDC__) \ 46 | || defined(_MSC_EXTENSIONS) \ 47 | || defined(PREDEF_COMPILER_BORLAND) 48 | # define PREDEF_STANDARD_C PREDEF_VERSION_C_1989 49 | # endif 50 | #endif 51 | 52 | #if defined(PREDEF_STANDARD_C) 53 | # if (PREDEF_STANDARD_C >= PREDEF_VERSION_C_1989) 54 | # define PREDEF_STANDARD_C_1989 55 | # endif 56 | # if (PREDEF_STANDARD_C >= PREDEF_VERSION_C_1990) 57 | # define PREDEF_STANDARD_C_1990 58 | # endif 59 | # if (PREDEF_STANDARD_C >= PREDEF_VERSION_C_1994) 60 | # define PREDEF_STANDARD_C_1994 61 | # endif 62 | # if (PREDEF_STANDARD_C >= PREDEF_VERSION_C_1999) 63 | # define PREDEF_STANDARD_C_1999 64 | # endif 65 | #endif 66 | 67 | /************************************************************************* 68 | * C++ Standards 69 | */ 70 | 71 | #define PREDEF_VERSION_CXX_1998 199711L 72 | 73 | #if defined(__cplusplus) 74 | # if (__cplusplus == 1) 75 | # define PREDEF_STANDARD_CXX PREDEF_VERSION_CXX98 76 | # else 77 | # define PREDEF_STANDARD_CXX __cplusplus 78 | # endif 79 | #endif 80 | 81 | #if defined(PREDEF_STANDARD_CXX) 82 | # if (PREDEF_STANDARD_CXX >= PREDEF_VERSION_CXX_1998) 83 | # define PREDEF_STANDARD_CXX_1998 84 | # endif 85 | #endif 86 | 87 | /************************************************************************* 88 | * Unix Standards 89 | */ 90 | 91 | #if defined(PREDEF_PLATFORM_UNIX) 92 | /* 93 | * Get the version test macros. 94 | */ 95 | # include 96 | #endif 97 | 98 | /* POSIX 1003.1 = ISO/IEC 9945-1:1990 */ 99 | #define PREDEF_VERSION_POSIX_1990 199009L 100 | /* POSIX 1003.1b = IEEE 1003.1b-1993 */ 101 | #define PREDEF_VERSION_POSIX_1993 199309L 102 | /* ISO/IEC 9945-1:1996 = IEEE 1003.1-1996 */ 103 | #define PREDEF_VERSION_POSIX_1996 199506L 104 | #define PREDEF_VERSION_POSIX_2001 200112L 105 | 106 | #if defined(_POSIX_VERSION) 107 | # define PREDEF_STANDARD_POSIX _POSIX_VERSION 108 | #endif 109 | 110 | #if defined(PREDEF_STANDARD_POSIX) 111 | # if (PREDEF_STANDARD_POSIX >= PREDEF_VERSION_POSIX_1990) 112 | # define PREDEF_STANDARD_POSIX_1990 113 | # endif 114 | # if (PREDEF_STANDARD_POSIX >= PREDEF_VERSION_POSIX_1993) 115 | # define PREDEF_STANDARD_POSIX_1993 116 | # endif 117 | # if (PREDEF_STANDARD_POSIX >= PREDEF_VERSION_POSIX_1996) 118 | # define PREDEF_STANDARD_POSIX_1996 119 | # endif 120 | # if (PREDEF_STANDARD_POSIX >= PREDEF_VERSION_POSIX_2001) 121 | # define PREDEF_STANDARD_POSIX_2001 122 | # endif 123 | #endif 124 | 125 | #if defined(_POSIX2_C_VERSION) 126 | # if (_POSIX2_C_VERSION >= 199209L) 127 | # define PREDEF_STANDARD_POSIX_1992 128 | # endif 129 | #endif 130 | 131 | /* X/Open Portability Guide 3 (XPG3)*/ 132 | #define PREDEF_VERSION_XOPEN_1989 300 133 | /* X/Open Portability Guide 4 (XPG4) */ 134 | #define PREDEF_VERSION_XOPEN_1992 400 135 | /* X/Open Single Unix Specification (XPG4v2, UNIX95) */ 136 | #define PREDEF_VERSION_XOPEN_1995 450 137 | /* X/Open Single Unix Specification version 2 (UNIX98) */ 138 | #define PREDEF_VERSION_XOPEN_1998 500 139 | /* Open Group Single Unix Specification version 3 (UNIX03) */ 140 | #define PREDEF_VERSION_XOPEN_2003 600 141 | 142 | 143 | /* Normalize XOPEN versions */ 144 | #if defined(_XOPEN_VERSION) 145 | # if (_XOPEN_VERSION == 4) && defined(_XOPEN_UNIX) 146 | # define PREDEF_STANDARD_XOPEN PREDEF_VERSION_XOPEN_1995 147 | # else 148 | # if (_XOPEN_VERSION <= 4) 149 | # define PREDEF_STANDARD_XOPEN (_XOPEN_VERSION * 100) 150 | # else 151 | # define PREDEF_STANDARD_XOPEN _XOPEN_VERSION 152 | # endif 153 | # endif 154 | #else 155 | # if defined(_XOPEN_XPG4) 156 | # define PREDEF_STANDARD_XOPEN PREDEF_VERSION_XOPEN_1992 157 | # else 158 | # if defined(_XOPEN_XPG3) 159 | # define PREDEF_STANDARD_XOPEN PREDEF_VERSION_XOPEN_1989 160 | # endif 161 | # endif 162 | #endif 163 | 164 | #if defined(PREDEF_STANDARD_XOPEN) 165 | # if (PREDEF_STANDARD_XOPEN >= PREDEF_VERSION_XOPEN_1989) 166 | # define PREDEF_STANDARD_XOPEN_1989 167 | # endif 168 | # if (PREDEF_STANDARD_XOPEN >= PREDEF_VERSION_XOPEN_1992) 169 | # define PREDEF_STANDARD_XOPEN_1992 170 | # endif 171 | # if (PREDEF_STANDARD_XOPEN >= PREDEF_VERSION_XOPEN_1995) 172 | # define PREDEF_STANDARD_XOPEN_1995 173 | # endif 174 | # if (PREDEF_STANDARD_XOPEN >= PREDEF_VERSION_XOPEN_1998) 175 | # define PREDEF_STANDARD_XOPEN_1998 176 | # endif 177 | # if (PREDEF_STANDARD_XOPEN >= PREDEF_VERSION_XOPEN_2003) 178 | # define PREDEF_STANDARD_XOPEN_2003 179 | # endif 180 | #endif 181 | 182 | #endif 183 | -------------------------------------------------------------------------------- /predef/setjmp.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: setjmp.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SETJMP_H 19 | #define PREDEF_SETJMP_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_SETJMP 26 | #include 27 | 28 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 29 | # define PREDEF_FUNC_SIGLONGJMP 30 | # define PREDEF_FUNC_SIGSETJMP 31 | #endif 32 | #if defined(PREDEF_STANDARD_XOPEN_1995) 33 | # define PREDEF_FUNC__LONGJMP 34 | # define PREDEF_FUNC__SETJMP 35 | #endif 36 | 37 | #endif /* PREDEF_SETJMP_H */ 38 | -------------------------------------------------------------------------------- /predef/signal.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: signal.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SIGNAL_H 19 | #define PREDEF_SIGNAL_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_SIGNAL 26 | #include 27 | 28 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 29 | # define PREDEF_FUNC_KILL 30 | # define PREDEF_FUNC_SIGACTION 31 | # define PREDEF_FUNC_SIGADDSET 32 | # define PREDEF_FUNC_SIGDELSET 33 | # define PREDEF_FUNC_SIGEMPTYSET 34 | # define PREDEF_FUNC_SIGFILLSET 35 | # define PREDEF_FUNC_SIGISMEMBER 36 | # define PREDEF_FUNC_SIGPENDING 37 | # define PREDEF_FUNC_SIGPROCMASK 38 | # define PREDEF_FUNC_SIGSUSPEND 39 | #endif 40 | #if defined(PREDEF_STANDARD_XOPEN_1995) 41 | # define PREDEF_FUNC_KILLPG 42 | # define PREDEF_FUNC_SIGALTSTACK 43 | # define PREDEF_FUNC_SIGHOLD 44 | # define PREDEF_FUNC_SIGIGNORE 45 | # define PREDEF_FUNC_SIGINTERRUPT 46 | # define PREDEF_FUNC_SIGPAUSE 47 | #endif 48 | 49 | #endif /* PREDEF_SIGNAL_H */ 50 | -------------------------------------------------------------------------------- /predef/stdarg.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stdarg.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STDARG_H 19 | #define PREDEF_STDARG_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_STDARG 26 | #include 27 | 28 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 29 | # define PREDEF_FUNC_VA_COPY 30 | #endif 31 | 32 | #endif /* PREDEF_STDARG_H */ 33 | -------------------------------------------------------------------------------- /predef/stdbool.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stdbool.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STDBOOL_H 19 | #define PREDEF_STDBOOL_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 26 | # define PREDEF_HEADER_STDBOOL 27 | # include 28 | #endif 29 | 30 | #endif /* PREDEF_STDBOOL_H */ 31 | -------------------------------------------------------------------------------- /predef/stdint.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stdint.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STDINT_H 19 | #define PREDEF_STDINT_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 26 | # define PREDEF_HEADER_STDINT 27 | # include 28 | #endif 29 | 30 | #endif /* PREDEF_STDINT_H */ 31 | -------------------------------------------------------------------------------- /predef/stdio.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stdio.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STDIO_H 19 | #define PREDEF_STDIO_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_STDIO 26 | #include 27 | 28 | #if defined(PREDEF_STANDARD_XOPEN_1989) 29 | # define PREDEF_FUNC_TEMPNAM 30 | #endif 31 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 32 | # define PREDEF_FUNC_PCLOSE 33 | # define PREDEF_FUNC_POPEN 34 | #endif 35 | #if defined(PREDEF_STANDARD_XOPEN_1992) || defined(PREDEF_STANDARD_POSIX_1992) 36 | # define PREDEF_FUNC_GETOPT 37 | #endif 38 | #if defined(PREDEF_STANDARD_XOPEN_1998) 39 | # define PREDEF_FUNC_FLOCKFILE 40 | # define PREDEF_FUNC_FSEEKO 41 | # define PREDEF_FUNC_FTELLO 42 | # define PREDEF_FUNC_FTRYLOCKFILE 43 | # define PREDEF_FUNC_FUNLOCKFILE 44 | # define PREDEF_FUNC_GETC_UNLOCKED 45 | # define PREDEF_FUNC_GETCHAR_UNLOCKED 46 | # define PREDEF_FUNC_PUTC_UNLOCKED 47 | # define PREDEF_FUNC_PUTCHAR_UNLOCKED 48 | #endif 49 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_1998) 50 | # define PREDEF_FUNC_SNPRINTF 51 | # define PREDEF_FUNC_VSNPRINTF 52 | #endif 53 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 54 | # define PREDEF_FUNC_VFSCANF 55 | # define PREDEF_FUNC_VSCANF 56 | # define PREDEF_FUNC_VSSCANF 57 | #endif 58 | 59 | #endif /* PREDEF_STDIO_H */ 60 | -------------------------------------------------------------------------------- /predef/stdlib.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stdlib.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STDLIB_H 19 | #define PREDEF_STDLIB_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_STDLIB 26 | #include 27 | 28 | #if defined(PREDEF_STARDARD_XOPEN_1992) 29 | # define PREDEF_FUNC_DRAND48 30 | # define PREDEF_FUNC_ERAND48 31 | # define PREDEF_FUNC_JRAND48 32 | # define PREDEF_FUNC_LCONG48 33 | # define PREDEF_FUNC_LRAND48 34 | # define PREDEF_FUNC_MRAND48 35 | # define PREDEF_FUNC_NRAND48 36 | # define PREDEF_FUNC_PUTENV 37 | # define PREDEF_FUNC_SEED48 38 | # define PREDEF_FUNC_SRAND48 39 | #endif 40 | #if defined(PREDEF_STARDARD_XOPEN_1995) 41 | # define PREDEF_FUNC_A64L 42 | # define PREDEF_FUNC_ECVT 43 | # define PREDEF_FUNC_FCVT 44 | # define PREDEF_FUNC_GCVT 45 | # define PREDEF_FUNC_GETSUBOPT 46 | # define PREDEF_FUNC_GRANTPT 47 | # define PREDEF_FUNC_INITSTATE 48 | # define PREDEF_FUNC_L64A 49 | # define PREDEF_FUNC_MKSTEMP 50 | # define PREDEF_FUNC_MKTEMP 51 | # define PREDEF_FUNC_PTSNAME 52 | # define PREDEF_FUNC_RANDOM 53 | # define PREDEF_FUNC_REALPATH 54 | # define PREDEF_FUNC_SETSTATE 55 | # define PREDEF_FUNC_SRANDOM 56 | # define PREDEF_FUNC_UNLOCKPT 57 | #endif 58 | #if defined(PREDEF_STARDARD_XOPEN_1998) 59 | # define PREDEF_FUNC_RAND_R 60 | #endif 61 | #if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 62 | # define PREDEF_FUNC_C__EXIT /* _Exit() */ 63 | # define PREDEF_FUNC_ATOLL 64 | # define PREDEF_FUNC_LLABS 65 | # define PREDEF_FUNC_LLDIV 66 | # define PREDEF_FUNC_STRTOF 67 | # define PREDEF_FUNC_STRTOLD 68 | # define PREDEF_FUNC_STRTOLL 69 | # define PREDEF_FUNC_STRTOULL 70 | #endif 71 | 72 | #endif /* PREDEF_STDLIB_H */ 73 | -------------------------------------------------------------------------------- /predef/string.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: string.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_STRING_H 19 | #define PREDEF_STRING_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #define PREDEF_HEADER_STRING 26 | #include 27 | 28 | #if defined(PREDEF_STARDARD_XOPEN_1989) \ 29 | || defined(PREDEF_LIBC_WINDOWS) 30 | # define PREDEF_FUNC_MEMCCPY 31 | #endif 32 | #if defined(PREDEF_STARDARD_XOPEN_1995) \ 33 | || defined(PREDEF_LIBC_WINDOWS) \ 34 | || (defined(PREDEF_LIBC_VMS) && (PREDEF_LIBC_VMS >= 70000000)) 35 | # define PREDEF_FUNC_STRDUP 36 | #endif 37 | #if defined(PREDEF_STARDARD_XOPEN_1998) 38 | # define PREDEF_FUNC_STRTOK_R 39 | #endif 40 | 41 | #endif /* PREDEF_STRING_H */ 42 | -------------------------------------------------------------------------------- /predef/sys/stat.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: stat.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SYS_STAT_H 19 | #define PREDEF_SYS_STAT_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 26 | # define PREDEF_HEADER_SYS_STAT 27 | # include 28 | # define PREDEF_FUNC_CHMOD 29 | # define PREDEF_FUNC_FSTAT 30 | # define PREDEF_FUNC_MKDIR 31 | # define PREDEF_FUNC_MKFIFO 32 | # define PREDEF_FUNC_STAT 33 | # define PREDEF_FUNC_UMASK 34 | # if defined(PREDEF_STANDARD_XOPEN_1995) || defined(PREDEF_STANDARD_POSIX_1992) 35 | # define PREDEF_FUNC_FCHMOD 36 | # endif 37 | # if defined(PREDEF_STANDARD_XOPEN_1995) 38 | # define PREDEF_FUNC_LSTAT 39 | # define PREDEF_FUNC_MKNOD 40 | # endif 41 | #endif 42 | 43 | #endif /* PREDEF_SYS_STAT_H */ 44 | -------------------------------------------------------------------------------- /predef/sys/time.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: time.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SYS_TIME_H 19 | #define PREDEF_SYS_TIME_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1995) \ 26 | || (defined(PREDEF_LIBC_GNU) && (PREDEF_LIBC_GNU >= 20000)) 27 | # define PREDEF_HEADER_SYS_TIME 28 | # include 29 | 30 | # define PREDEF_FUNC_GETITIMER 31 | # define PREDEF_FUNC_GETTIMEOFDAY 32 | # define PREDEF_FUNC_SELECT 33 | # define PREDEF_FUNC_SETITIMER 34 | # define PREDEF_FUNC_UTIMES 35 | #endif 36 | 37 | #endif /* PREDEF_SYS_TIME_H */ 38 | -------------------------------------------------------------------------------- /predef/sys/timeb.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: timeb.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SYS_TIMEB_H 19 | #define PREDEF_SYS_TIMEB_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1995) \ 26 | || (defined(PREDEF_LIBC_GNU) && (PREDEF_LIBC_GNU >= 20000)) 27 | # define PREDEF_HEADER_SYS_TIMEB 28 | # include 29 | 30 | # define PREDEF_FUNC_FTIME 31 | #endif 32 | 33 | #endif /* PREDEF_SYS_TIMEB_H */ 34 | -------------------------------------------------------------------------------- /predef/sys/types.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: types.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_SYS_TYPES_H 19 | #define PREDEF_SYS_TYPES_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 26 | # define PREDEF_HEADER_SYS_TYPES 27 | # include 28 | #endif 29 | 30 | #endif /* PREDEF_SYS_TYPES_H */ 31 | -------------------------------------------------------------------------------- /predef/unistd.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: unistd.h,v 1.1 2003/08/03 18:03:52 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_UNISTD_H 19 | #define PREDEF_UNISTD_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_XOPEN_1989) || defined(PREDEF_STANDARD_POSIX_1990) 26 | # define PREDEF_HEADER_UNISTD 27 | # include 28 | 29 | # define PREDEF_FUNC_ACCESS 30 | # define PREDEF_FUNC_ALARM 31 | # define PREDEF_FUNC_CHDIR 32 | # define PREDEF_FUNC_CHMOD 33 | # define PREDEF_FUNC_CHOWN 34 | # define PREDEF_FUNC_CLOSE 35 | # define PREDEF_FUNC_CTERMID 36 | # define PREDEF_FUNC_DUP 37 | # define PREDEF_FUNC_DUP2 38 | # define PREDEF_FUNC_EXECL 39 | # define PREDEF_FUNC_EXECLE 40 | # define PREDEF_FUNC_EXECLP 41 | # define PREDEF_FUNC_EXECV 42 | # define PREDEF_FUNC_EXECVE 43 | # define PREDEF_FUNC_EXECVP 44 | # define PREDEF_FUNC_FORK 45 | # define PREDEF_FUNC_FPATHCONF 46 | # define PREDEF_FUNC_GETCWD 47 | # define PREDEF_FUNC_GETEGID 48 | # define PREDEF_FUNC_GETEUID 49 | # define PREDEF_FUNC_GETGID 50 | # define PREDEF_FUNC_GETGROUPS 51 | # define PREDEF_FUNC_GETLOGIN 52 | # define PREDEF_FUNC_GETPGRP 53 | # define PREDEF_FUNC_GETPID 54 | # define PREDEF_FUNC_GETPPID 55 | # define PREDEF_FUNC_GETUID 56 | # define PREDEF_FUNC_LINK 57 | # define PREDEF_FUNC_LSEEK 58 | # define PREDEF_FUNC_PATHCONF 59 | # define PREDEF_FUNC_PAUSE 60 | # define PREDEF_FUNC_PIPE 61 | # define PREDEF_FUNC_READ 62 | # define PREDEF_FUNC_RMDIR 63 | # define PREDEF_FUNC_SETGID 64 | # define PREDEF_FUNC_SETPGID 65 | # define PREDEF_FUNC_SETSID 66 | # define PREDEF_FUNC_SETUID 67 | # define PREDEF_FUNC_SLEEP 68 | # define PREDEF_FUNC_SYSCONF 69 | # define PREDEF_FUNC_TCGETPGRP 70 | # define PREDEF_FUNC_TCSETPGRP 71 | # define PREDEF_FUNC_TTYNAME 72 | # define PREDEF_FUNC_UNLINK 73 | # define PREDEF_FUNC_WRITE 74 | 75 | # if defined(PREDEF_STANDARD_XOPEN_1992) 76 | # define PREDEF_FUNC_NICE 77 | # define PREDEF_FUNC_SWAB 78 | # endif 79 | 80 | # if defined(PREDEF_STANDARD_XOPEN_1992) || defined(PREDEF_STANDARD_POSIX_1992) 81 | # define PREDEF_FUNC_CONFSTR 82 | # define PREDEF_FUNC_FSYNC 83 | # define PREDEF_FUNC_GETOPT 84 | # endif 85 | 86 | # if defined(PREDEF_STANDARD_XOPEN_1995) 87 | # define PREDEF_FUNC_FCHDIR 88 | # define PREDEF_FUNC_FCHMOD 89 | # define PREDEF_FUNC_GETHOSTID 90 | # define PREDEF_FUNC_GETHOSTNAME 91 | # define PREDEF_FUNC_GETPGID 92 | # define PREDEF_FUNC_GETSID 93 | # define PREDEF_FUNC_GETWD 94 | # define PREDEF_FUNC_LCHOWN 95 | # define PREDEF_FUNC_LOCKF 96 | # define PREDEF_FUNC_READLINK 97 | # define PREDEF_FUNC_SETPGRP 98 | # define PREDEF_FUNC_SETREGID 99 | # define PREDEF_FUNC_SETREUID 100 | # define PREDEF_FUNC_SYMLINK 101 | # define PREDEF_FUNC_SYNC 102 | # define PREDEF_FUNC_TRUNCATE 103 | # define PREDEF_FUNC_UALARM 104 | # define PREDEF_FUNC_USLEEP 105 | # define PREDEF_FUNC_VFORK 106 | # endif 107 | 108 | # if defined(PREDEF_STANDARD_XOPEN_1995) || defined(PREDEF_STANDARD_POSIX_1992) 109 | # define PREDEF_FUNC_FTRUNCATE 110 | # endif 111 | 112 | # if defined(PREDEF_STANDARD_XOPEN_1998) || defined(PREDEF_STANDARD_POSIX_1993) 113 | # define PREDEF_FUNC_FDATASYNC 114 | # endif 115 | 116 | # if defined(PREDEF_STANDARD_XOPEN_1998) 117 | # define PREDEF_FUNC_GETLOGIN_R 118 | # define PREDEF_FUNC_PREAD 119 | # define PREDEF_FUNC_PWRITE 120 | # define PREDEF_FUNC_TTYNAME_R 121 | # endif 122 | #endif 123 | 124 | #endif /* PREDEF_UNISTD_H */ 125 | -------------------------------------------------------------------------------- /predef/wchar.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: wchar.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_WCHAR_H 19 | #define PREDEF_WCHAR_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_C_1994) || defined(PREDEF_STANDARD_XOPEN_1992) 26 | # define PREDEF_HEADER_WCHAR 27 | # include 28 | 29 | # define PREDEF_FUNC_FGETWC 30 | # define PREDEF_FUNC_FGETWS 31 | # define PREDEF_FUNC_FPUTWC 32 | # define PREDEF_FUNC_FPUTWS 33 | # define PREDEF_FUNC_GETWC 34 | # define PREDEF_FUNC_GETWCHAR 35 | # define PREDEF_FUNC_PUTWC 36 | # define PREDEF_FUNC_PUTWCHAR 37 | # define PREDEF_FUNC_UNGETWC 38 | # define PREDEF_FUNC_WCSCAT 39 | # define PREDEF_FUNC_WCSCHR 40 | # define PREDEF_FUNC_WCSCMP 41 | # define PREDEF_FUNC_WCSCOLL 42 | # define PREDEF_FUNC_WCSCPY 43 | # define PREDEF_FUNC_WCSCSPN 44 | # define PREDEF_FUNC_WCSFTIME 45 | # define PREDEF_FUNC_WCSLEN 46 | # define PREDEF_FUNC_WCSNCAT 47 | # define PREDEF_FUNC_WCSNCMP 48 | # define PREDEF_FUNC_WCSNCPY 49 | # define PREDEF_FUNC_WCSPBRK 50 | # define PREDEF_FUNC_WCSRCHR 51 | # define PREDEF_FUNC_WCSSPN 52 | # define PREDEF_FUNC_WCSSTR 53 | # define PREDEF_FUNC_WCSTOD 54 | # define PREDEF_FUNC_WCSTOK 55 | # define PREDEF_FUNC_WCSTOL 56 | # define PREDEF_FUNC_WCSTOUL 57 | # define PREDEF_FUNC_WCSXFRM 58 | 59 | # if defined(PREDEF_STANDARD_XOPEN_1992) 60 | # if !defined(PREDEF_FUNC_ISWALPHA) 61 | /* These may already have been defined in */ 62 | # define PREDEF_FUNC_ISWALNUM 63 | # define PREDEF_FUNC_ISWALPHA 64 | # define PREDEF_FUNC_ISWCNTRL 65 | # define PREDEF_FUNC_ISWCTYPE 66 | # define PREDEF_FUNC_ISWDIGIT 67 | # define PREDEF_FUNC_ISWGRAPH 68 | # define PREDEF_FUNC_ISWLOWER 69 | # define PREDEF_FUNC_ISWPRINT 70 | # define PREDEF_FUNC_ISWPUNCT 71 | # define PREDEF_FUNC_ISWSPACE 72 | # define PREDEF_FUNC_ISWUPPER 73 | # define PREDEF_FUNC_ISWXDIGIT 74 | # define PREDEF_FUNC_TOWLOWER 75 | # define PREDEF_FUNC_TOWUPPER 76 | # endif 77 | # define PREDEF_FUNC_WCSWCS 78 | # define PREDEF_FUNC_WCSWIDTH 79 | # define PREDEF_FUNC_WCTYPE 80 | # define PREDEF_FUNC_WCWIDTH 81 | # endif 82 | 83 | # if defined(PREDEF_STANDARD_C_1994) || defined(PREDEF_STANDARD_XPEN_1998) 84 | # define PREDEF_FUNC_BTOWC 85 | # define PREDEF_FUNC_FWIDE 86 | # define PREDEF_FUNC_FWPRINTF 87 | # define PREDEF_FUNC_FWSCANF 88 | # define PREDEF_FUNC_MBRLEN 89 | # define PREDEF_FUNC_MBRTOWC 90 | # define PREDEF_FUNC_MBSINIT 91 | # define PREDEF_FUNC_SWPRINTF 92 | # define PREDEF_FUNC_SWSCANF 93 | # define PREDEF_FUNC_VFWPRINTF 94 | # define PREDEF_FUNC_VSWPRINTF 95 | # define PREDEF_FUNC_VWPRINTF 96 | # define PREDEF_FUNC_WCRTOMB 97 | # define PREDEF_FUNC_WCSRTOMBS 98 | # define PREDEF_FUNC_WCTOB 99 | # define PREDEF_FUNC_WMEMCHR 100 | # define PREDEF_FUNC_WMEMCMP 101 | # define PREDEF_FUNC_WMEMCPY 102 | # define PREDEF_FUNC_WMEMMOVE 103 | # define PREDEF_FUNC_WMEMSET 104 | # define PREDEF_FUNC_WPRINTF 105 | # define PREDEF_FUNC_WSCANF 106 | # endif 107 | 108 | # if defined(PREDEF_STANDARD_C_1999) || defined(PREDEF_STANDARD_XOPEN_2003) 109 | # define PREDEF_FUNC_VFWSCANF 110 | # define PREDEF_FUNC_VSWSCANF 111 | # define PREDEF_FUNC_VWSCANF 112 | # define PREDEF_FUNC_WCSTOF 113 | # define PREDEF_FUNC_WCSTOLL 114 | # define PREDEF_FUNC_WCSTOULL 115 | # endif 116 | 117 | #endif 118 | 119 | #endif /* PREDEF_WCHAR_H */ 120 | -------------------------------------------------------------------------------- /predef/wctype.h: -------------------------------------------------------------------------------- 1 | /************************************************************************* 2 | * 3 | * $Id: wctype.h,v 1.2 2005/05/22 11:50:58 breese Exp $ 4 | * 5 | * Copyright (C) 2003 Bjorn Reese 6 | * 7 | * Permission to use, copy, modify, and distribute this software for any 8 | * purpose with or without fee is hereby granted, provided that the above 9 | * copyright notice and this permission notice appear in all copies. 10 | * 11 | * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED 12 | * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF 13 | * MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE AUTHORS AND 14 | * CONTRIBUTORS ACCEPT NO RESPONSIBILITY IN ANY CONCEIVABLE MANNER. 15 | * 16 | ************************************************************************/ 17 | 18 | #ifndef PREDEF_WCTYPE_H 19 | #define PREDEF_WCTYE_H 20 | 21 | #ifndef PREDEF_PREDEF_H 22 | # include 23 | #endif 24 | 25 | #if defined(PREDEF_STANDARD_C_1994) || defined(PREDEF_STANDARD_XOPEN_1998) 26 | # define PREDEF_HEADER_WCTYPE 27 | # include 28 | 29 | # if !defined(PREDEF_FUNC_ISWALNUM) 30 | /* These may already have been defined in */ 31 | # define PREDEF_FUNC_ISWALNUM 32 | # define PREDEF_FUNC_ISWALPHA 33 | # define PREDEF_FUNC_ISWCNTRL 34 | # define PREDEF_FUNC_ISWCTYPE 35 | # define PREDEF_FUNC_ISWDIGIT 36 | # define PREDEF_FUNC_ISWGRAPH 37 | # define PREDEF_FUNC_ISWLOWER 38 | # define PREDEF_FUNC_ISWPRINT 39 | # define PREDEF_FUNC_ISWPUNCT 40 | # define PREDEF_FUNC_ISWSPACE 41 | # define PREDEF_FUNC_ISWUPPER 42 | # define PREDEF_FUNC_ISWXDIGIT 43 | # define PREDEF_FUNC_TOWLOWER 44 | # define PREDEF_FUNC_TOWUPPER 45 | # endif 46 | # define PREDEF_FUNC_TOWCTRANS 47 | # define PREDEF_FUNC_WCTRANS 48 | # define PREDEF_FUNC_WCTYPE 49 | 50 | #endif 51 | 52 | #endif /* PREDEF_WCTYPE_H */ 53 | --------------------------------------------------------------------------------