blob: b0eed50d6143d37ad822387fcc117abc3a3c268e (
plain)
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
|
/*
--
-- SYNOPSIS
-- General use macros.
--
-- DESCRIPTION
-- ANSI macro relies on the fact that it can be replaced by (), or by
-- its value, where the value is one value due to the preprocessors
-- handling of arguments that are surrounded by ()'s as a single
-- argument.
--
-- AUTHOR
-- Dennis Vadura, dvadura@dmake.wticorp.com
--
-- WWW
-- http://dmake.wticorp.com/
--
-- COPYRIGHT
-- Copyright (c) 1996,1997 by WTI Corp. All rights reserved.
--
-- This program is NOT free software; you can redistribute it and/or
-- modify it under the terms of the Software License Agreement Provided
-- in the file <distribution-root>/readme/license.txt.
--
-- LOG
-- Use cvs log to obtain detailed change logs.
*/
#ifndef MACROS_h
#define MACROS_h
/* AIX and Mac MPW define __STDC__ as special, but defined(__STDC__) is false,
* and it has no value. */
#ifndef __STDC__
#define __STDC__ 0
#endif
/* MSVC 6 and newer understand ANSI prototypes */
#if __STDC__ || defined(__TURBOC__) || defined(__IBMC__) || defined (_MSC_VER)
#define ANSI(x) x
#else
#define ANSI(x) ()
#endif
#define NIL(p) ((p*)NULL)
/* Cygwin defines _STDDEF_H with only one leading '_' */
#if !defined(atarist) && !defined(__STDDEF_H) && !defined(_STDDEF_H)
#define offsetof(type,id) ((size_t)&((type*)NULL)->id)
#endif
#define FALSE 0
#define TRUE 1
#define PUBLIC
#endif
|