1 /* c-std.h: the first header files.
3 Copyright 1992 Karl Berry
4 Copyright 2007 TeX Users Group
5 Copyright 2014 Clerk Ma
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 2 of the License, or
10 (at your option) any later version.
12 This program is distributed in the hope that it will be useful, but
13 WITHOUT ANY WARRANTY; without even the implied warranty of
14 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 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
19 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
25 /* Header files that essentially all of our sources need, and
26 that all implementations have. We include these first, to help with
27 NULL being defined multiple times. */
31 /* POSIX.1 says that <unistd.h> may require <sys/types.h>. */
32 #include <sys/types.h>
34 /* This is the symbol that X uses to determine if <sys/types.h> has been
35 read, so we define it. */
38 /* X uses this symbol to say whether we have <stddef.h> etc. */
40 #define X_NOT_STDC_ENV
43 /* Be sure we have constants from <unistd.h>. */
46 /* Include <stdlib.h> first to help avoid NULL redefinitions. */
50 #else /* end of STDC_HEADERS */
51 extern char *getenv (const char *); /* extern char *getenv(); */
53 #ifndef ALLOC_RETURN_TYPE
56 #define ALLOC_RETURN_TYPE void
57 #else /* end of DOS case */
58 #define ALLOC_RETURN_TYPE char
60 #endif /* not ALLOC_RETURN_TYPE */
62 /* extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc(); */
63 extern ALLOC_RETURN_TYPE *calloc (size_t, size_t);
64 extern ALLOC_RETURN_TYPE *malloc (size_t);
65 extern ALLOC_RETURN_TYPE *realloc (void *, size_t);
66 #endif /* not STDC_HEADERS */
68 /* strchr vs. index, memcpy vs. bcopy, etc. */
71 /* Error numbers and errno declaration. */
74 /* Numeric minima and maxima. */
77 /* popen is part of POSIX.2, not POSIX.1. So STDC_HEADERS isn't enough. */
78 /* extern FILE *popen(); */
79 /* extern double hypot(); */
80 /* extern double hypot (double, double); */ /* see math.h */
82 #endif /* not C_STD_H */