Standard tweaks to make dbgen happy with OSX
parent
b6efac9bd7
commit
a4cd033a9a
|
@ -0,0 +1,3 @@
|
|||
*.o
|
||||
qgen
|
||||
dbgen
|
|
@ -74,7 +74,9 @@
|
|||
#include <ctype.h>
|
||||
#include <math.h>
|
||||
#ifndef _POSIX_SOURCE
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#endif /* POSIX_SOURCE */
|
||||
#include <fcntl.h>
|
||||
#include <sys/types.h>
|
||||
|
|
|
@ -719,7 +719,7 @@ pr_cust(customer_t *c, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)i < threshold+1) {
|
||||
add_placeholder(CUST, (long)c->custkey, 0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
@ -864,7 +864,7 @@ pr_order(order_t *o, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)i < threshold+1) {
|
||||
add_placeholder(ORDER,(long)o->okey,0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
@ -1301,7 +1301,7 @@ pr_part(part_t *part, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)j <threshold+1) {
|
||||
add_placeholder(PART,(long)part->partkey,0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
@ -1573,7 +1573,7 @@ pr_supp(supplier_t *supp, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)j <threshold+1) {
|
||||
add_placeholder(SUPP,(long)supp->suppkey,0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
@ -1699,7 +1699,7 @@ pr_nation(code_t *c, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)j <threshold+1) {
|
||||
add_placeholder(NATION,(long)c->code,0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
@ -1779,7 +1779,7 @@ pr_region(code_t *c, int mode)
|
|||
if (TUPLE_LEVEL) {
|
||||
if ((long)j <threshold+1) {
|
||||
add_placeholder(REGION,(long)c->code,0);
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
threshold = -1;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#ORIGINAL TPC-H distribution
|
||||
/* #ORIGINAL TPC-H distribution */
|
||||
#define VERSION 2
|
||||
#define RELEASE 6
|
||||
#define PATCH 0
|
||||
|
|
|
@ -41,7 +41,9 @@
|
|||
*/
|
||||
#include <stdio.h>
|
||||
#ifndef _POSIX_SOURCE
|
||||
#ifndef __APPLE__
|
||||
#include <malloc.h>
|
||||
#endif
|
||||
#endif /* POSIX_SOURCE */
|
||||
#if (defined(_POSIX_)||!defined(WIN32))
|
||||
#include <unistd.h>
|
||||
|
|
Loading…
Reference in New Issue