Merging serial model from branch; converting to the hideous indentation style of...
[lwes-journaller.git] / src / global.h
blob02a3199b29e68cf8665e9387226303e7a92adf46
1 /* GLOBAL.H - RSAREF types and constants
2 */
4 /* Copyright (C) RSA Laboratories, a division of RSA Data Security,
5 Inc., created 1991. All rights reserved.
6 */
8 #include <config.h>
10 #ifndef _GLOBAL_H_
11 #define _GLOBAL_H_ 1
13 /* PROTOTYPES should be set to one if and only if the compiler supports
14 function argument prototyping.
15 The following makes PROTOTYPES default to 1 if it has not already been
16 defined as 0 with C compiler flags.
18 #ifndef PROTOTYPES
19 #define PROTOTYPES 1
20 #endif
22 /* POINTER defines a generic pointer type */
23 typedef unsigned char *POINTER;
25 /* UINT2 defines a two byte word */
26 /* UINT4 defines a four byte word */
28 #include <sys/types.h>
30 #ifdef HAVE_U_INT16_T
31 #define FIXED_SIZE_TYPES 1
32 typedef u_int16_t UINT2;
33 typedef u_int32_t UINT4;
34 #elif HAVE_UINT16_T
35 #define FIXED_SIZE_TYPES 1
36 typedef uint16_t UINT2;
37 typedef uint32_t UINT4;
38 #endif
40 #ifndef FIXED_SIZE_TYPES
41 #error need fixed size integer typedefs
42 #endif
44 #ifndef NULL_PTR
45 #define NULL_PTR ((POINTER)0)
46 #endif
48 #ifndef UNUSED_ARG
49 #define UNUSED_ARG(x) x = *(&x);
50 #endif
52 /* PROTO_LIST is defined depending on how PROTOTYPES is defined above.
53 If using PROTOTYPES, then PROTO_LIST returns the list, otherwise it
54 returns an empty list.
56 #if PROTOTYPES
57 #define PROTO_LIST(list) list
58 #else
59 #define PROTO_LIST(list) ()
60 #endif
62 #endif /* end _GLOBAL_H_ */