home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
GEMini Atari
/
GEMini_Atari_CD-ROM_Walnut_Creek_December_1993.iso
/
zip
/
gnu
/
includ87.lzh
/
INCLUD87
/
COMPILER.H
< prev
next >
Wrap
C/C++ Source or Header
|
1993-07-30
|
4KB
|
177 lines
/* compiler specific defines */
/* this file is guaranteed to be included exactly once if you include
anything at all. all site-dependent or compiler-dependent stuff
should go here!!!
*/
#ifndef _COMPILER_H
#define _COMPILER_H
/* symbols to identify the type of compiler */
#ifdef __SOZOBONC__
#define __SOZOBON__ __SOZOBONC__
#else
# ifdef SOZOBON
# define __SOZOBON__ SOZOBON
# endif
#endif
#ifdef LATTICE
#define __LATTICE__
#endif
/* general library stuff */
/* __SIZE_TYPEDEF__: the type returned by sizeof() */
/* __PTRDIFF_TYPEDEF__: the type of the difference of two pointers */
/* __WCHAR_TYPEDEF__: wide character type (i.e. type of L'x') */
/* __EXITING: the type of a function that exits */
/* __CDECL: function must get parameters on stack */
/* if !__CDECL, passing in registers is OK */
/* symbols to report about compiler features */
/* #define __NEED_VOID__ compiler doesn't have a void type */
/* #define __MSHORT__ compiler uses 16 bit integers */
/* (note that gcc and C68 define this automatically when appropriate) */
#ifdef __GNUC__
#ifndef sun
# define __SIZE_TYPEDEF__ unsigned long
# define __PTRDIFF_TYPEDEF__ long
# define __WCHAR_TYPEDEF__ int
#else
/* sun always seems to have an agenda of their own */
# include <sys/stdtypes.h>
# define __SIZE_TYPEDEF__ int /* can you believe this!! */
# define __PTRDIFF_TYPEDEF__ int /* or this!! */
# define __WCHAR_TYPEDEF__ unsigned short /* this seems reasonable */
# define _SIZE_T __SIZE_TYPEDEF__
# define _WCHAR_T __WCHAR_TYPEDEF__
#endif
#define __EXITING volatile void
#ifndef __NO_INLINE__
# define __GNUC_INLINE__
#endif
#endif
#ifdef __LATTICE__
#define __SIZE_TYPEDEF__ unsigned long
#define __PTRDIFF_TYPEDEF__ long
#define __WCHAR_TYPEDEF__ char
#define __EXITING void
#ifdef _SHORTINT
# define __MSHORT__
#endif
#endif
#ifdef __C68__
#define __SIZE_TYPEDEF__ unsigned long
#define __PTRDIFF_TYPEDEF__ long
#define __WCHAR_TYPEDEF__ char
#define __EXITING void
#endif
#ifdef __SOZOBON__
/*
* Temporary hacks to overcome 1.33i's short symbol names. Hopefully future
* versions will allow the extended Sozobon symbol format.
*/
#define _mallocChunkSize _sc_mCS
#define _malloczero _sc_mz
#define _console_read_byte _sc_crb
#define _console_write_byte _sc_cwb
/* Doesn't know (void *) is special (but can handle it); this works better. */
#define __NULL (0L)
#ifdef OLD_SOZOBON
#define void char
#endif
#define __SIZE_TYPEDEF__ unsigned int
#define __PTRDIFF_TYPEDEF__ long
#define __WCHAR_TYPEDEF__ char
#define __EXITING void
#define __MSHORT__
#endif /* __SOZOBON__ */
#ifdef __TURBOC__
#ifndef __STDC__
# define __STDC__ 1
#endif
#define __SIZE_TYPEDEF__ unsigned long
#define __PTRDIFF_TYPEDEF__ long
#define __WCHAR_TYPEDEF__ char
#define __EXITING void
#define __MSHORT__
#define __VA_LIST__ void *
#define __CDECL cdecl
/* As long as we haven't ported gemlib to Pure C and hence have to use
* Turbo's/Pure's GEM library, define the next:
*/
#define __TCC_GEMLIB__
#endif /* __TURBOC__ */
#if defined(__hpux) && (!defined(__GNUC__))
#define __SIZE_TYPEDEF__ unsigned int
#define __PTRDIFF_TYPEDEF__ int
#define __WCHAR_TYPEDEF__ unsigned int
#define __EXITING void
#endif
/* some default declarations */
/* if your compiler needs something
* different, define it above
*/
#ifndef __VA_LIST__
#define __VA_LIST__ char *
#endif
#ifndef __CDECL
#define __CDECL
#endif
#ifndef __NULL
# ifdef __MSHORT__
# define __NULL ((void *)0)
# else
/* avoid complaints about misuse of NULL :-) */
# define __NULL (0)
# endif
#endif
#ifdef __cplusplus
# define __EXTERN
# define __PROTO(x) x
#else
# ifdef __STDC__
# ifndef __NO_PROTO__
# define __PROTO(x) x
# endif
# define __EXTERN
# else
# define __EXTERN extern
/*
* fudge non-ANSI compilers to be like ANSI
*/
# define const
# define volatile
# ifdef __NEED_VOID__
typedef char void; /* so that (void *) is the same as (char *) */
/* also lets us know that foo() {...} and void foo() {...} are
different */
# endif
# endif /* __STDC__ */
#endif /* __cplusplus */
#ifndef __PROTO
#define __PROTO(x) ()
#endif
/* macros for POSIX support */
#ifndef __hpux
#define _UID_T unsigned short
#define _GID_T unsigned short
#define _PID_T int
#endif
#endif /* _COMPILER_H */