home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.mactech.com 2010
/
ftp.mactech.com.tar
/
ftp.mactech.com
/
online
/
source
/
c
/
compilers
/
Tickle-4.0.sit.hqx
/
Tickle-4.0
/
cbtree
/
src
/
cdefs.h
< prev
next >
Wrap
Text File
|
1992-05-03
|
2KB
|
78 lines
#ifndef _CDEFS_H_
#define _CDEFS_H_
/* BEGIN TGE */
#ifdef NEVER_DEFINED
# define MALLOC(size) Malloc(size, __FILE__, __LINE__)
# define FREE(ptr) Free(ptr, __FILE__, __LINE__)
#endif
#define MALLOC(size) malloc(size)
#define FREE(ptr) free(ptr)
#ifndef u_long
typedef unsigned long u_long;
#endif
#ifndef u_int
typedef unsigned int u_int;
#endif
#ifndef u_char
typedef unsigned char u_char;
#endif
#define htonl(x) x
#define LITTLE_ENDIAN 1234 /* LSB first: i386, vax */
#define BIG_ENDIAN 4321 /* MSB first: 68000, ibm, net */
#define PDP_ENDIAN 3412 /* LSB first in word, MSW first in long */
#define BYTE_ORDER BIG_ENDIAN
/* END TGE */
#if defined(__cplusplus)
#define __BEGIN_DECLS extern "C" {
#define __END_DECLS };
#else
#define __BEGIN_DECLS
#define __END_DECLS
#endif
/*
* The __CONCAT macro is used to concatenate parts of symbol names, e.g.
* with "#define OLD(foo) __CONCAT(old,foo)", OLD(foo) produces oldfoo.
* The __CONCAT macro is a bit tricky -- make sure you don't put spaces
* in between its arguments. __CONCAT can also concatenate double-quoted
* strings produced by the __STRING macro, but this only works with ANSI C.
*/
#if defined(__STDC__) || defined(__cplusplus)
#define __P(protos) protos /* full-blown ANSI C */
#define __CONCAT(x,y) x ## y
#define __STRING(x) #x
#else /* !(__STDC__ || __cplusplus) */
#define __P(protos) () /* traditional C preprocessor */
#define __CONCAT(x,y) x/**/y
#define __STRING(x) "x"
#ifdef __GNUC__
#define const __const /* GCC: ANSI C with -traditional */
#define inline __inline
#define signed __signed
#define volatile __volatile
#else /* !__GNUC__ */
#define const /* delete ANSI C keywords */
#define inline
#define signed
#define volatile
#endif /* !__GNUC__ */
#endif /* !(__STDC__ || __cplusplus) */
#endif /* !_CDEFS_H_ */