home *** CD-ROM | disk | FTP | other *** search
/ linuxmafia.com 2016 / linuxmafia.com.tar / linuxmafia.com / pub / linux / backup / star-1.3.1.tar.gz / star-1.3.1.tar / star-1.3.1 / include / prototyp.h < prev    next >
C/C++ Source or Header  |  2001-05-31  |  2KB  |  86 lines

  1. /* @(#)prototyp.h    1.9 01/05/31 Copyright 1995 J. Schilling */
  2. /*
  3.  *    Definitions for dealing with ANSI / KR C-Compilers
  4.  *
  5.  *    Copyright (c) 1995 J. Schilling
  6.  */
  7. /*
  8.  * This program is free software; you can redistribute it and/or modify
  9.  * it under the terms of the GNU General Public License as published by
  10.  * the Free Software Foundation; either version 2, or (at your option)
  11.  * any later version.
  12.  *
  13.  * This program is distributed in the hope that it will be useful,
  14.  * but WITHOUT ANY WARRANTY; without even the implied warranty of
  15.  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16.  * GNU General Public License for more details.
  17.  *
  18.  * You should have received a copy of the GNU General Public License
  19.  * along with this program; see the file COPYING.  If not, write to
  20.  * the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  */
  22.  
  23. #ifndef    _PROTOTYP_H
  24. #define    _PROTOTYP_H
  25.  
  26. #ifndef    PROTOTYPES
  27.     /*
  28.      * If this has already been defined,
  29.      * someone else knows better than us...
  30.      */
  31. #    ifdef    __STDC__
  32. #        if    __STDC__                /* ANSI C */
  33. #            define    PROTOTYPES
  34. #        endif
  35. #        if    defined(sun) && __STDC__ - 0 == 0    /* Sun C */
  36. #            define    PROTOTYPES
  37. #        endif
  38. #    endif
  39. #endif    /* PROTOTYPES */
  40.  
  41. #if    !defined(PROTOTYPES) && (defined(__cplusplus) || defined(_MSC_VER))
  42.     /*
  43.      * C++ always supports prototypes.
  44.      * Define PROTOTYPES so we are not forced to make
  45.      * a separtate autoconf run for C++
  46.      *
  47.      * Microsoft C has prototypes but does not define __STDC__
  48.      */
  49. #    define    PROTOTYPES
  50. #endif
  51.  
  52. /*
  53.  * If we have prototypes, we should have stdlib.h string.h stdarg.h
  54.  */
  55. #ifdef    PROTOTYPES
  56. #if    !(defined(SABER) && defined(sun))
  57. #    ifndef    HAVE_STDARG_H
  58. #        define    HAVE_STDARG_H
  59. #    endif
  60. #endif
  61. #    ifndef    HAVE_STDLIB_H
  62. #        define    HAVE_STDLIB_H
  63. #    endif
  64. #    ifndef    HAVE_STRING_H
  65. #        define    HAVE_STRING_H
  66. #    endif
  67. #    ifndef    HAVE_STDC_HEADERS
  68. #        define    HAVE_STDC_HEADERS
  69. #    endif
  70. #    ifndef    STDC_HEADERS
  71. #        define    STDC_HEADERS    /* GNU name */
  72. #    endif
  73. #endif
  74.  
  75. #ifdef    NO_PROTOTYPES        /* Force not to use prototypes */
  76. #    undef    PROTOTYPES
  77. #endif
  78.  
  79. #ifdef    PROTOTYPES
  80. #    define    __PR(a)    a
  81. #else
  82. #    define    __PR(a)    ()
  83. #endif
  84.  
  85. #endif    /* _PROTOTYP_H */
  86.