1/*
2 * this file allows the compilation of DBGEN to be tailored to specific
3 * architectures and operating systems. Some options are grouped
4 * together to allow easier compilation on a given vendor's hardware.
5 *
6 * The following #defines will effect the code:
7 * SEPARATOR -- character used to separate fields in flat files
8 * STDLIB_HAS_GETOPT -- to prevent confilcts with gloabal getopt()
9 * MDY_DATE -- generate dates as MM-DD-YY
10 * WIN32 -- support for WindowsNT
11 * DSS_HUGE -- 64 bit data type
12 * HUGE_FORMAT -- printf string for 64 bit data type
13 * EOL_HANDLING -- flat files don't need final column separator
14 *
15 * Certain defines must be provided in the makefile:
16 * MACHINE defines
17 * ==========
18 * ATT -- getopt() handling
19 * HP -- posix source inclusion differences
20 * IBM -- posix source inclusion differences
21 * SGI -- getopt() handling
22 * SUN -- getopt() handling
23 * LINUX
24 * WIN32 -- for WINDOWS
25 *
26 * DATABASE defines
27 * ================
28 * DB2 -- use DB2 dialect in QGEN
29 * INFORMIX -- use Informix dialect in QGEN
30 * SQLSERVER -- use SQLSERVER dialect in QGEN
31 * SYBASE -- use Sybase dialect in QGEN
32 * TDAT -- use Teradata dialect in QGEN
33 *
34 * WORKLOAD defines
35 * ================
36 * TPCH -- make will create TPCH (set in makefile)
37 */
38
39#ifdef ATT
40#define STDLIB_HAS_GETOPT
41#ifdef SQLSERVER
42#define WIN32
43#else
44#define DSS_HUGE long long
45#define RNG_A 6364136223846793005ull
46#define RNG_C 1ull
47#define HUGE_FORMAT "%LLd"
48#define HUGE_DATE_FORMAT "%02LLd"
49#endif /* SQLSERVER or MP/RAS */
50#endif /* ATT */
51
52#ifdef HP
53#define _INCLUDE_POSIX_SOURCE
54#define STDLIB_HAS_GETOPT
55#define DSS_HUGE long
56#define HUGE_COUNT 2
57#define HUGE_FORMAT "%ld"
58#define HUGE_DATE_FORMAT "%02lld"
59#define RNG_C 1ull
60#define RNG_A 6364136223846793005ull
61#endif /* HP */
62
63#ifdef IBM
64#define STDLIB_HAS_GETOPT
65#define DSS_HUGE long long
66#define HUGE_FORMAT "%lld"
67#define HUGE_DATE_FORMAT "%02lld"
68#define RNG_A 6364136223846793005ull
69#define RNG_C 1ull
70#endif /* IBM */
71
72#ifdef LINUX
73#define STDLIB_HAS_GETOPT
74#define DSS_HUGE long long int
75#define HUGE_FORMAT "%lld"
76#define HUGE_DATE_FORMAT "%02lld"
77#define RNG_A 6364136223846793005ull
78#define RNG_C 1ull
79#endif /* LINUX */
80
81#ifdef MAC
82//#define _POSIX_C_SOURCE 200112L
83//#define _POSIX_SOURCE
84#define STDLIB_HAS_GETOPT
85#define SUPPORT_64BITS
86#define DSS_HUGE long long
87#define HUGE_FORMAT "%ld"
88#define HUGE_DATE_FORMAT "%02ld"
89#define RNG_A 6364136223846793005ull
90#define RNG_C 1ull
91#endif /* MAC */
92
93#ifdef SUN
94#define STDLIB_HAS_GETOPT
95#define RNG_A 6364136223846793005ull
96#define RNG_C 1ull
97#define DSS_HUGE long long
98#define HUGE_FORMAT "%lld"
99#define HUGE_DATE_FORMAT "%02lld"
100#endif /* SUN */
101
102#ifdef SGI
103#define STDLIB_HAS_GETOPT
104#define DSS_HUGE __int64_t
105#endif /* SGI */
106
107#if (defined(WIN32) && !defined(_POSIX_))
108#define PATH_SEP '\\'
109#define DSS_HUGE __int64
110#define RNG_A 6364136223846793005uI64
111#define RNG_C 1uI64
112#define HUGE_FORMAT "%I64d"
113#define HUGE_DATE_FORMAT "%02I64d"
114/* requried by move to Visual Studio 2005 */
115#define strdup(x) _strdup(x)
116#endif /* WIN32 */
117
118#ifndef PATH_SEP
119#define PATH_SEP '/'
120#endif /* PATH_SEP */
121