Skip to content

Commit

Permalink
Switch OSX to MACOS
Browse files Browse the repository at this point in the history
  • Loading branch information
gregrahn committed May 7, 2018
1 parent 7e04d16 commit e13d795
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 226 deletions.
26 changes: 13 additions & 13 deletions dbgen/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -103,14 +103,14 @@
CC = gcc
# Current values for DATABASE are: INFORMIX, DB2, TDAT (Teradata)
# SQLSERVER, SYBASE, ORACLE, VECTORWISE, POSTGRESQL
# Current values for MACHINE are: ATT, DOS, HP, IBM, ICL, MVS, OSX
# SGI, SUN, U2200, VMS, LINUX, WIN32
# Current values for MACHINE are: ATT, DOS, HP, IBM, ICL, MVS, MACOS
# SGI, SUN, U2200, VMS, LINUX, WIN32
# Current values for WORKLOAD are: TPCH
DATABASE = POSTGRESQL
MACHINE = LINUX
DATABASE = POSTGRESQL
MACHINE = LINUX
WORKLOAD = TPCH
#
CFLAGS = -g -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -DRNG_TEST -D_FILE_OFFSET_BITS=64
CFLAGS = -g -DDBNAME=\"dss\" -D$(MACHINE) -D$(DATABASE) -D$(WORKLOAD) -DRNG_TEST -D_FILE_OFFSET_BITS=64
LDFLAGS = -O
# The OBJ,EXE and LIB macros will need to be changed for compilation under
# Windows NT
Expand All @@ -137,7 +137,7 @@ HDR = $(HDR1) $(HDR2)
#
SRC1 = build.c driver.c bm_utils.c rnd.c print.c load_stub.c bcd2.c \
speed_seed.c text.c permute.c rng64.c
SRC2 = qgen.c varsub.c
SRC2 = qgen.c varsub.c
SRC = $(SRC1) $(SRC2)
#
OBJ1 = build$(OBJ) driver$(OBJ) bm_utils$(OBJ) rnd$(OBJ) print$(OBJ) \
Expand All @@ -147,7 +147,7 @@ OBJ2 = build$(OBJ) bm_utils$(OBJ) qgen$(OBJ) rnd$(OBJ) varsub$(OBJ) \
text$(OBJ) bcd2$(OBJ) permute$(OBJ) speed_seed$(OBJ) rng64$(OBJ)
OBJS = $(OBJ1) $(OBJ2)
#
SETS = dists.dss
SETS = dists.dss
DOC=README HISTORY PORTING.NOTES BUGS
DDL = dss.ddl dss.ri
WINDOWS_IDE = tpch.dsw dbgen.dsp tpch.sln tpch.vcproj qgen.vcproj
Expand All @@ -160,7 +160,7 @@ FQD=queries/1.sql queries/2.sql queries/3.sql queries/4.sql queries/5.sql querie
queries/8.sql queries/9.sql queries/10.sql queries/11.sql queries/12.sql queries/13.sql \
queries/14.sql queries/15.sql queries/16.sql queries/17.sql queries/18.sql queries/19.sql queries/20.sql \
queries/21.sql queries/22.sql
VARIANTS= variants/8a.sql variants/12a.sql variants/13a.sql variants/14a.sql variants/15a.sql
VARIANTS= variants/8a.sql variants/12a.sql variants/13a.sql variants/14a.sql variants/15a.sql
ANS = answers/q1.out answers/q2.out answers/q3.out answers/q4.out answers/q5.out answers/q6.out answers/q7.out answers/q8.out \
answers/q9.out answers/q10.out answers/q11.out answers/q12.out answers/q13.out answers/q14.out answers/q15.out \
answers/q16.out answers/q17.out answers/q18.out answers/q19.out answers/q20.out answers/q21.out answers/q22.out
Expand All @@ -170,26 +170,26 @@ REFERENCE=reference/[tcR]*
REFERENCE_DATA=referenceData/[13]*
SCRIPTS= check55.sh column_split.sh dop.sh gen_tasks.sh last_row.sh load_balance.sh new55.sh check_dirs.sh
ALLSRC=$(DBGENSRC) $(REFERENCE) $(QSRC) $(SCRIPTS)
JUNK =
JUNK =
#
all: $(PROGS)
$(PROG1): $(OBJ1) $(SETS)
$(PROG1): $(OBJ1) $(SETS)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ1) $(LIBS)
$(PROG2): permute.h $(OBJ2)
$(PROG2): permute.h $(OBJ2)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ2) $(LIBS)
clean:
rm -f $(PROGS) $(OBJS) $(JUNK)
lint:
lint $(CFLAGS) -u -x -wO -Ma -p $(SRC1)
lint $(CFLAGS) -u -x -wO -Ma -p $(SRC2)

tar: $(ALLSRC)
tar: $(ALLSRC)
tar cvhf - $(ALLSRC) --exclude .svn\*/\* |gzip - > tpch_${VERSION}_${RELEASE}_${PATCH}.tar.gz
tar cvhf - $(REFERENCE_DATA) --exclude .svn\*/\* |gzip - > reference_${VERSION}_${RELEASE}_${PATCH}.tar.gz
zip: $(ALLSRC)
zip -r tpch_${VERSION}_${RELEASE}_${PATCH}.zip $(ALLSRC) -x *.svn*
zip -r reference_${VERSION}_${RELEASE}_${PATCH}.zip $(REFERENCE_DATA) -x *.svn*
release:
release:
make -f makefile.suite tar
make -f makefile.suite zip
( cd tests; sh test_list.sh `date '+%Y%m%d'` )
Expand Down
198 changes: 0 additions & 198 deletions dbgen/Makefile.osx

This file was deleted.

29 changes: 14 additions & 15 deletions dbgen/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,18 +51,18 @@
*
*
*/
/*
/*
* this file allows the compilation of DBGEN to be tailored to specific
* architectures and operating systems. Some options are grouped
* architectures and operating systems. Some options are grouped
* together to allow easier compilation on a given vendor's hardware.
*
*
* The following #defines will effect the code:
* KILL(pid) -- how to terminate a process in a parallel load
* SPAWN -- name of system call to clone an existing process
* SET_HANDLER(proc) -- name of routine to handle signals in parallel load
* WAIT(res, pid) -- how to await the termination of a child
* SEPARATOR -- character used to separate fields in flat files
* STDLIB_HAS_GETOPT -- to prevent confilcts with gloabal getopt()
* STDLIB_HAS_GETOPT -- to prevent confilcts with gloabal getopt()
* MDY_DATE -- generate dates as MM-DD-YY
* WIN32 -- support for WindowsNT
* SUPPORT_64BITS -- compiler defines a 64 bit datatype
Expand All @@ -79,7 +79,7 @@
* IBM -- posix source inclusion differences
* SGI -- getopt() handling
* SUN -- getopt() handling
* LINUX
* LINUX
* WIN32 -- for WINDOWS
*
* DATABASE defines
Expand Down Expand Up @@ -131,8 +131,8 @@
#define STDLIB_HAS_GETOPT
#define SUPPORT_64BITS
#define DSS_HUGE long long
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#define RNG_A 6364136223846793005ull
#define RNG_C 1ull
#endif /* IBM */
Expand All @@ -141,13 +141,13 @@
#define STDLIB_HAS_GETOPT
#define SUPPORT_64BITS
#define DSS_HUGE long long int
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#define RNG_A 6364136223846793005ull
#define RNG_C 1ull
#endif /* LINUX */

#ifdef OSX
#ifdef MACOS
#define _POSIX_C_SOURCE 200112L
#define _POSIX_SOURCE
#define STDLIB_HAS_GETOPT
Expand All @@ -157,16 +157,16 @@
#define HUGE_DATE_FORMAT "%02ld"
#define RNG_A 6364136223846793005ull
#define RNG_C 1ull
#endif /* OSX */
#endif /* MACOS */

#ifdef SUN
#define STDLIB_HAS_GETOPT
#define RNG_A 6364136223846793005ull
#define RNG_C 1ull
#define SUPPORT_64BITS
#define DSS_HUGE long long
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#define HUGE_FORMAT "%lld"
#define HUGE_DATE_FORMAT "%02lld"
#endif /* SUN */

#ifdef SGI
Expand Down Expand Up @@ -200,7 +200,7 @@
/* these are copied from Linux/GNU and need to be verified as part of a rework of */
/* process handling under NT (29 Apr 98) */
#define WIFEXITED(s) ((s & 0xFF) == 0)
#define WIFSIGNALED(s) (((unsigned int)((status)-1) & 0xFFFF) < 0xFF)
#define WIFSIGNALED(s) (((unsigned int)((status)-1) & 0xFFFF) < 0xFF)
#define WIFSTOPPED(s) (((s) & 0xff) == 0x7f)
#define WTERMSIG(s) ((s) & 0x7f)
#define WSTOPSIG(s) (((s) & 0xff00) >> 8)
Expand Down Expand Up @@ -228,4 +228,3 @@
#ifndef DOUBLE_CAST
#define DOUBLE_CAST (double)
#endif /* DOUBLE_CAST */

0 comments on commit e13d795

Please sign in to comment.