Use the QVM build toolchain from ioq3
This commit is contained in:
@@ -9,7 +9,7 @@ char rcsid[] = "cpp.c - faked rcsid";
|
||||
|
||||
#define OUTS 16384
|
||||
char outbuf[OUTS];
|
||||
char *outp = outbuf;
|
||||
char *outbufp = outbuf;
|
||||
Source *cursource;
|
||||
int nerrs;
|
||||
struct token nltoken = { NL, 0, 0, 0, 1, (uchar*)"\n" };
|
||||
@@ -19,6 +19,15 @@ int ifdepth;
|
||||
int ifsatisfied[NIF];
|
||||
int skipping;
|
||||
|
||||
time_t reproducible_time()
|
||||
{
|
||||
char *source_date_epoch;
|
||||
time_t t;
|
||||
if ((source_date_epoch = getenv("SOURCE_DATE_EPOCH")) == NULL ||
|
||||
(t = (time_t)strtol(source_date_epoch, NULL, 10)) <= 0)
|
||||
return time(NULL);
|
||||
return t;
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
@@ -28,7 +37,7 @@ main(int argc, char **argv)
|
||||
char ebuf[BUFSIZ];
|
||||
|
||||
setbuf(stderr, ebuf);
|
||||
t = time(NULL);
|
||||
t = reproducible_time();
|
||||
curtime = ctime(&t);
|
||||
maketokenrow(3, &tr);
|
||||
expandlex();
|
||||
@@ -51,7 +60,7 @@ process(Tokenrow *trp)
|
||||
for (;;) {
|
||||
if (trp->tp >= trp->lp) {
|
||||
trp->tp = trp->lp = trp->bp;
|
||||
outp = outbuf;
|
||||
outbufp = outbuf;
|
||||
anymacros |= gettokens(trp, 1);
|
||||
trp->tp = trp->bp;
|
||||
}
|
||||
@@ -250,7 +259,6 @@ control(Tokenrow *trp)
|
||||
break;
|
||||
}
|
||||
setempty(trp);
|
||||
return;
|
||||
}
|
||||
|
||||
void *
|
||||
|
||||
Reference in New Issue
Block a user