1 /* 2 * This file has been modified for the cdrkit suite. 3 * 4 * The behaviour and appearence of the program code below can differ to a major 5 * extent from the version distributed by the original author(s). 6 * 7 * For details, see Changelog file distributed with the cdrkit package. If you 8 * received this file from another source then ask the distributing person for 9 * a log of modifications. 10 * 11 */ 12 13 /* @(#)prototyp.h 1.11 03/08/23 Copyright 1995 J. Schilling */ 14 /* 15 * Definitions for dealing with ANSI / KR C-Compilers 16 * 17 * Copyright (c) 1995 J. Schilling 18 */ 19 /* 20 * This program is free software; you can redistribute it and/or modify 21 * it under the terms of the GNU General Public License version 2 22 * as published by the Free Software Foundation. 23 * 24 * This program is distributed in the hope that it will be useful, 25 * but WITHOUT ANY WARRANTY; without even the implied warranty of 26 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 27 * GNU General Public License for more details. 28 * 29 * You should have received a copy of the GNU General Public License along with 30 * this program; see the file COPYING. If not, write to the Free Software 31 * Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 32 */ 33 34 /* 35 * mconfig.h includes prototype.h so we must do this include before we test 36 * for _PROTOTYP_H 37 */ 38 #ifndef _MCONFIG_H 39 #include <mconfig.h> 40 #endif 41 42 #ifndef _PROTOTYP_H 43 #define _PROTOTYP_H 44 45 #ifndef PROTOTYPES 46 /* 47 * If this has already been defined, 48 * someone else knows better than us... 49 */ 50 # ifdef __STDC__ 51 # if __STDC__ /* ANSI C */ 52 # define PROTOTYPES 53 # endif 54 # if defined(sun) && __STDC__ - 0 == 0 /* Sun C */ 55 # define PROTOTYPES 56 # endif 57 # endif 58 #endif /* PROTOTYPES */ 59 60 #if !defined(PROTOTYPES) && (defined(__cplusplus) || defined(_MSC_VER)) 61 /* 62 * C++ always supports prototypes. 63 * Define PROTOTYPES so we are not forced to make 64 * a separtate autoconf run for C++ 65 * 66 * Microsoft C has prototypes but does not define __STDC__ 67 */ 68 # define PROTOTYPES 69 #endif 70 71 /* 72 * If we have prototypes, we should have stdlib.h string.h stdarg.h 73 */ 74 #ifdef PROTOTYPES 75 #if !(defined(SABER) && defined(sun)) 76 # ifndef HAVE_STDARG_H 77 # define HAVE_STDARG_H 78 # endif 79 #endif 80 #ifndef JOS 81 # ifndef HAVE_STDLIB_H 82 # define HAVE_STDLIB_H 83 # endif 84 # ifndef HAVE_STRING_H 85 # define HAVE_STRING_H 86 # endif 87 # ifndef HAVE_STDC_HEADERS 88 # define HAVE_STDC_HEADERS 89 # endif 90 # ifndef STDC_HEADERS 91 # define STDC_HEADERS /* GNU name */ 92 # endif 93 #endif 94 #endif 95 96 #ifdef NO_PROTOTYPES /* Force not to use prototypes */ 97 # undef PROTOTYPES 98 #endif 99 100 #ifdef PROTOTYPES 101 # define __PR(a) a 102 #else 103 # define __PR(a) () 104 #endif 105 106 #endif /* _PROTOTYP_H */ 107