home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / unixtex-6.1b-src.tgz / tar.out / contrib / unixtex / kpathsea / c-std.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-09-28  |  2.8 KB  |  101 lines

  1. /* c-std.h: the first header files.
  2.  
  3. Copyright (C) 1992, 93, 94 Free Software Foundation, Inc.
  4.  
  5. This program is free software; you can redistribute it and/or modify
  6. it under the terms of the GNU General Public License as published by
  7. the Free Software Foundation; either version 2, or (at your option)
  8. any later version.
  9.  
  10. This program is distributed in the hope that it will be useful,
  11. but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13. GNU General Public License for more details.
  14.  
  15. You should have received a copy of the GNU General Public License
  16. along with this program; if not, write to the Free Software
  17. Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. #ifndef KPATHSEA_C_STD_H
  20. #define KPATHSEA_C_STD_H
  21.  
  22. /* Header files that essentially all of our sources need, and
  23.    that all implementations have.  We include these first, to help with
  24.    NULL being defined multiple times.  */
  25. #include <math.h>
  26. #include <stdio.h>
  27.  
  28. /* Be sure we have constants from <unistd.h>.  */
  29. #include <kpathsea/c-unistd.h>
  30.  
  31. #if HAVE_STDLIB_H
  32. #include <stdlib.h>
  33. /* Include <stdlib.h> before <stddef.h>, to help avoid NULL
  34.    redefinitions on some systems.  (We don't include <stddef.h>
  35.    ourselves any more, but FYI.)  */
  36. #else
  37. /* It's impossible to say for sure what the system will deign to put in
  38.    <stdlib.h>, but let's hope it's at least these.  */
  39. extern char *getenv ();
  40.  
  41. #ifndef ALLOC_RETURN_TYPE
  42. #ifdef DOS
  43. #define ALLOC_RETURN_TYPE void
  44. #else
  45. #define ALLOC_RETURN_TYPE char
  46. #endif /* not DOS */
  47. #endif /* not ALLOC_RETURN_TYPE */
  48.  
  49. #ifndef _MALLOC_INTERNAL
  50. /* Don't bother to declare these if we are compiling gmalloc.c itself.  */
  51. extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
  52. #endif
  53.  
  54. #endif /* not STDC_HEADERS */
  55.  
  56. /* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
  57.    EXIT_FAILURE.  So far no system has defined one of EXIT_FAILURE and
  58.    EXIT_SUCCESS without the other.  */
  59. #ifndef EXIT_SUCCESS
  60. #ifdef VMS
  61. #define EXIT_SUCCESS 1
  62. #define EXIT_FAILURE 0
  63. #else
  64. #define EXIT_SUCCESS 0
  65. #define EXIT_FAILURE 1
  66. #endif
  67. #endif /* not EXIT_SUCCESS */
  68.  
  69. /* strchr vs. index, memcpy vs. bcopy, etc.  */
  70. #include <kpathsea/c-memstr.h>
  71.  
  72. /* Error numbers and errno declaration.  */
  73. #include <kpathsea/c-errno.h>
  74.  
  75. /* Numeric minima and maxima.  */
  76. #include <kpathsea/c-minmax.h>
  77.  
  78. /* Assertions are too useful to not make generally available.  */
  79. #ifdef HAVE_ASSERT_H
  80. #include <assert.h>
  81. #else
  82. #define assert(expr) /* as nothing */
  83. #endif
  84.  
  85. #ifdef VMS
  86. #include <unixlib.h>
  87. #include <unixio.h>
  88. #else
  89. /* `popen' and `pclose' are part of POSIX.2, not POSIX.1.  So
  90.    STDC_HEADERS isn't enough.  */
  91. extern FILE *popen ();
  92. extern int pclose ();
  93. #endif
  94.  
  95. #ifndef hypot
  96. /* hypot appears not to have made it into POSIX.2, even.  */
  97. extern double hypot ();
  98. #endif
  99.  
  100. #endif /* not KPATHSEA_C_STD_H */
  101.