Remove OPENLINK define

This commit is contained in:
Bruce Momjian 1996-11-04 04:53:51 +00:00
parent 0108fddf13
commit 18bbad7696
5 changed files with 6 additions and 37 deletions

View File

@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.6 1996/10/31 10:19:59 scrappy Exp $
* $Id: fd.c,v 1.7 1996/11/04 04:53:24 momjian Exp $
*
* NOTES:
*
@ -197,14 +197,12 @@ static int FileAccess(File file);
static File fileNameOpenFile(FileName fileName, int fileFlags, int fileMode);
static char *filepath(char *filename);
#ifdef OPENLINK_PATCHES
pg_fsync(fd)
{
extern int fsyncOff;
return fsyncOff ? 0 : fsync(fd);
}
#define fsync pg_fsync
#endif
#if defined(FDDEBUG)
static void

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.6 1996/11/03 05:07:55 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.7 1996/11/04 04:53:27 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -470,11 +470,7 @@ mdblindwrt(char *dbstr,
status = SM_SUCCESS;
/* write and sync the block */
#ifdef OPENLINK_PATCHES
if (write(fd, buffer, BLCKSZ) != BLCKSZ || (pg_fsync(fd) < 0))
#else
if (write(fd, buffer, BLCKSZ) != BLCKSZ || fsync(fd) < 0)
#endif
status = SM_FAIL;
if (close(fd) < 0)

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.13 1996/11/03 06:52:33 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.14 1996/11/04 04:53:31 momjian Exp $
*
* NOTES
* this is the "main" module of the postgres backend and
@ -92,9 +92,7 @@ CommandDest whereToSendOutput;
extern int lockingOff;
extern int NBuffers;
#ifdef OPENLINK_PATCHES
int fsyncOff = 0;
#endif
int dontExecute = 0;
static int ShowStats;
@ -742,22 +740,16 @@ her exceeded legal ranges or was a divide by zero");
static void usage(char* progname)
{
#ifdef OPENLINK_PATCHES
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
#else
fprintf(stderr,
"Usage: %s [-B nbufs] [-d lvl] ] [-f plantype] \t[-m portno] [\t -o filename]\n",
progname);
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLNopQSs] [dbname]\n");
#endif
fprintf(stderr,"\t[-P portno] [-t tracetype] [-x opttype] [-bCEiLFNopQSs] [dbname]\n");
fprintf(stderr, " b: consider bushy plan trees during optimization\n");
fprintf(stderr, " B: set number of buffers in buffer pool\n");
fprintf(stderr, " C: supress version info\n");
fprintf(stderr, " d: set debug level\n");
fprintf(stderr, " E: echo query before execution\n");
#ifdef OPENLINK_PATCHES
fprintf(stderr, " F: turn off fsync\n");
#endif
fprintf(stderr, " f: forbid plantype generation\n");
fprintf(stderr, " i: don't execute the query, just show the plan tree\n");
fprintf(stderr, " L: turn off locking\n");
@ -857,11 +849,7 @@ PostgresMain(int argc, char *argv[])
hostName = hostbuf;
}
#ifdef OPENLINK_PATCHES
while ((flag = getopt(argc, argv, "B:bCd:Ef:iLm:MNo:P:pQSst:x:F")) != EOF)
#else
while ((flag = getopt(argc, argv, "B:bCd:Ef:iLm:MNo:P:pQSst:x:")) != EOF)
#endif
switch (flag) {
case 'b':
@ -908,7 +896,6 @@ PostgresMain(int argc, char *argv[])
flagE = 1;
break;
#ifdef OPENLINK_PATCHES
case 'F':
/* --------------------
* turn off fsync
@ -916,7 +903,6 @@ PostgresMain(int argc, char *argv[])
*/
fsyncOff = 1;
break;
#endif
case 'f':
/* -----------------
@ -1264,7 +1250,7 @@ PostgresMain(int argc, char *argv[])
*/
if (IsUnderPostmaster == false) {
puts("\nPOSTGRES backend interactive interface");
puts("$Revision: 1.13 $ $Date: 1996/11/03 06:52:33 $");
puts("$Revision: 1.14 $ $Date: 1996/11/04 04:53:31 $");
}
/* ----------------

View File

@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.3 1996/08/26 20:38:52 scrappy Exp $
* $Header: /cvsroot/pgsql/src/backend/utils/adt/varchar.c,v 1.4 1996/11/04 04:53:37 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@ -68,13 +68,8 @@ bpcharin(char *s, int dummy, int typlen)
typlen = len + 4;
}
#ifndef OPENLINK_PATCHES
if (len < 1 || len > 4096)
elog(WARN, "bpcharin: length of char() must be between 1 and 4096");
#else
if (len > 4096)
elog(WARN, "bpcharin: length of char() must be less than 4096");
#endif
result = (char *) palloc(typlen);
*(int32*)result = typlen;
@ -137,13 +132,8 @@ varcharin(char *s, int dummy, int typlen)
typlen = len + 4;
}
#ifndef OPENLINK_PATCHES
if (len < 1 || len > 4096)
elog(WARN, "bpcharin: length of char() must be between 1 and 4096");
#else
if (len > 4096)
elog(WARN, "varcharin: length of char() must be less than 4096");
#endif
result = (char *) palloc(typlen);
*(int32*)result = typlen;

View File

@ -180,7 +180,6 @@
/* found in src/backend/utils/adt/arrayfuncs.c */
/* #define LOARRAY */
#define OPENLINK_PATCHES
/* This is the time, in seconds, at which a given backend server
* will wait on a lock before deciding to abort the transaction