-
Notifications
You must be signed in to change notification settings - Fork 7
/
defines.h
63 lines (50 loc) · 1.51 KB
/
defines.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
/* defines.h -- customization based on gcc predefined macroes */
#ifndef __DEFINES_H__
#define __DEFINES_H__
#if __unix__ || (defined(__APPLE__) && defined(__MACH__))
# define UNIX 1
# if __NetBSD__ || __OpenBSD__ || (defined(__APPLE__) && defined(__MACH__))
# define BSD 1
# define POSIX 1
# elif __linux__
# define USG 1
# define SVR4 1 /* locks */
# define POSIX 1
# else /* __CYGWIN__ */
# define USG 1
//# define POSIX 1
# endif
#else
# error Missing gcc predefined __unix__
#endif
#define NSTRING 128 /* # of bytes, string buffers */
#define TERMCAP 1 /* UNIX */
#define XONXOFF 1 /* UNIX */
#define VISMAC 0 /* update display during keyboard macros */
#define MSDOS 0
#define IBMPC MSDOS
#define COLOR MSDOS
#define FILOCK (SVR4 | BSD)
#define ENVFUNC 1 /* only two types so far (USG | BSD) */
#define PKCODE 1 /* include P.K. extensions, define always */
#define SCROLLCODE 1 /* scrolling code P.K. */
/* Dynamic RAM tracking and reporting redefinitions */
#define RAMSIZE 0 /* dynamic RAM memory usage tracking */
#if RAMSIZE
# define RAMSHOW 1 /* auto dynamic RAM reporting */
# include <stdlib.h> /* size_t */
void *allocate( size_t size) ;
void release( void *ptr) ;
# define malloc( sz) allocate(sz)
# define free( ptr) release( ptr)
#endif
/* De-allocate memory always on exit (if the operating system or main
program can not)
*/
#define CLEAN 0 /* de-alloc memory on exit */
#if CLEAN
# define exit(a) cexit(a)
void cexit( int status) ;
#endif
#endif
/* end of predefs.h */