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