home *** CD-ROM | disk | FTP | other *** search
/ Geek Gadgets 1 / ADE-1.bin / ade-dist / octave-1.1.1p1-base.tgz / octave-1.1.1p1-base.tar / fsf / octave / kpathsea / c-std.h < prev    next >
C/C++ Source or Header  |  1994-02-01  |  3KB  |  107 lines

  1. /* c-std.h: the first header files.
  2.  
  3. Copyright (C) 1992, 93 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. /* X uses these symbols to say whether we have <stddef.h>, <string.h>,
  23.    etc.  We never use them ourselves.  */
  24. #ifdef STDC_HEADERS
  25. #define SYSV
  26. #else
  27. #define X_NOT_STDC_ENV
  28. #endif
  29.  
  30. /* Header files that essentially all of our sources need, and
  31.    that all implementations have.  We include these first, to help with
  32.    NULL being defined multiple times.  */
  33. #include <math.h>
  34. #include <stdio.h>
  35.  
  36. /* Be sure we have constants from <unistd.h>.  */
  37. #include <kpathsea/c-unistd.h>
  38.  
  39. #if HAVE_STDLIB_H
  40. #include <stdlib.h>
  41. /* Include <stdlib.h> before <stddef.h>, to help avoid NULL
  42.    redefinitions on some systems.  (We don't include <stddef.h>
  43.    ourselves any more, but FYI.)  */
  44. #else
  45. /* It's impossible to say for sure what the system will deign to put in
  46.    <stdlib.h>, but let's hope it's at least these.  */
  47. extern char *getenv ();
  48.  
  49. #ifndef ALLOC_RETURN_TYPE
  50. #ifdef DOS
  51. #define ALLOC_RETURN_TYPE void
  52. #else
  53. #define ALLOC_RETURN_TYPE char
  54. #endif /* not DOS */
  55. #endif /* not ALLOC_RETURN_TYPE */
  56.  
  57. #ifndef _MALLOC_INTERNAL
  58. /* Don't bother to declare these if we are compiling gmalloc.c itself.  */
  59. extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
  60. #endif
  61.  
  62. #endif /* not STDC_HEADERS */
  63.  
  64. /* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
  65.    EXIT_FAILURE.  So far no system has defined one of EXIT_FAILURE and
  66.    EXIT_SUCCESS without the other.  */
  67. #ifndef EXIT_SUCCESS
  68. #ifdef VMS
  69. #define EXIT_SUCCESS 1
  70. #define EXIT_FAILURE 0
  71. #else
  72. #define EXIT_SUCCESS 0
  73. #define EXIT_FAILURE 1
  74. #endif
  75. #endif /* not EXIT_SUCCESS */
  76.  
  77. /* strchr vs. index, memcpy vs. bcopy, etc.  */
  78. #include <kpathsea/c-memstr.h>
  79.  
  80. /* Error numbers and errno declaration.  */
  81. #include <kpathsea/c-errno.h>
  82.  
  83. /* Numeric minima and maxima.  */
  84. #include <kpathsea/c-minmax.h>
  85.  
  86. /* Assertions are too useful to not make generally available.  */
  87. #ifdef HAVE_ASSERT_H
  88. #include <assert.h>
  89. #else
  90. #define assert(expr) /* as nothing */
  91. #endif
  92.  
  93. #ifdef VMS
  94. #include <unixlib.h>
  95. #include <unixio.h>
  96. #else
  97. /* `popen' and `pclose' are part of POSIX.2, not POSIX.1.  So
  98.    STDC_HEADERS isn't enough.  */
  99. extern FILE *popen ();
  100. extern int pclose ();
  101. #endif
  102.  
  103. /* hypot appears not to have made it into POSIX.2, even.  */
  104. extern double hypot ();
  105.  
  106. #endif /* not KPATHSEA_C_STD_H */
  107.