home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / octa21fs.zip / octave / kpathsea / c-std.h < prev    next >
C/C++ Source or Header  |  2000-01-15  |  3KB  |  99 lines

  1. /* c-std.h: the first header files.
  2.  
  3. Copyright (C) 1992, 93, 94, 95, 96, 97 Free Software Foundation, Inc.
  4.  
  5. This library is free software; you can redistribute it and/or
  6. modify it under the terms of the GNU Library General Public
  7. License as published by the Free Software Foundation; either
  8. version 2 of the License, or (at your option) any later version.
  9.  
  10. This library 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 GNU
  13. Library General Public License for more details.
  14.  
  15. You should have received a copy of the GNU Library General Public
  16. License along with this library; if not, write to the Free Software
  17. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, 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. #ifdef 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 this.  */
  39. extern char *getenv ();
  40. #endif /* not HAVE_STDLIB_H */
  41.  
  42. #ifdef WIN32
  43. #include <malloc.h>
  44. #else
  45. #ifndef STDC_HEADERS
  46. #ifndef ALLOC_RETURN_TYPE
  47. #ifdef DOSISH
  48. #define ALLOC_RETURN_TYPE void
  49. #else
  50. #define ALLOC_RETURN_TYPE char
  51. #endif /* not DOSISH */
  52. #endif /* not ALLOC_RETURN_TYPE */
  53. extern ALLOC_RETURN_TYPE *calloc (), *malloc (), *realloc ();
  54. #endif /* not STDC_HEADERS */
  55. #endif /* not WIN32 */
  56.  
  57. /* SunOS 4.1.1 gets STDC_HEADERS defined, but it doesn't provide
  58.    EXIT_FAILURE.  So far no system has defined one of EXIT_FAILURE and
  59.    EXIT_SUCCESS without the other.  */
  60. #ifndef EXIT_SUCCESS
  61. #ifdef VMS
  62. #define EXIT_SUCCESS 1
  63. #define EXIT_FAILURE 0
  64. #else
  65. #define EXIT_SUCCESS 0
  66. #define EXIT_FAILURE 1
  67. #endif
  68. #endif /* not EXIT_SUCCESS */
  69.  
  70. /* strchr vs. index, memcpy vs. bcopy, etc.  */
  71. #include <kpathsea/c-memstr.h>
  72.  
  73. /* Error numbers and errno declaration.  */
  74. #include <kpathsea/c-errno.h>
  75.  
  76. /* Numeric minima and maxima.  */
  77. #include <kpathsea/c-minmax.h>
  78.  
  79. /* Assertions are too useful to not make generally available.  */
  80. #ifdef HAVE_ASSERT_H
  81. #include <assert.h>
  82. #else
  83. #define assert(expr) /* as nothing */
  84. #endif
  85.  
  86. #ifdef VMS
  87. #include <unixlib.h>
  88. #include <unixio.h>
  89. #else
  90. #ifndef WIN32
  91. /* `popen' and `pclose' are part of POSIX.2, not POSIX.1.  So
  92.    STDC_HEADERS isn't enough.  */
  93. extern FILE *popen ();
  94. extern int pclose ();
  95. #endif /* not WIN32 */
  96. #endif /* not VMS */
  97.  
  98. #endif /* not KPATHSEA_C_STD_H */
  99.