1
0
mirror of https://github.com/postgres/postgres.git synced 2025-11-12 05:01:15 +03:00

Remove WIN32 defines. They never worked.

This commit is contained in:
Bruce Momjian
1997-02-14 04:19:07 +00:00
parent aaaba5a048
commit 31c8e94b34
26 changed files with 39 additions and 386 deletions

View File

@@ -6,7 +6,7 @@
* Copyright (c) 1994, Regents of the University of California
*
* IDENTIFICATION
* $Id: fd.c,v 1.14 1997/01/27 00:09:43 scrappy Exp $
* $Id: fd.c,v 1.15 1997/02/14 04:16:26 momjian Exp $
*
* NOTES:
*
@@ -134,13 +134,8 @@ static int nfile = 0;
* that we can open it and find out if we really have any descriptors
* available or not.
*/
#ifndef WIN32
static char *Nulldev = "/dev/null";
static char Sep_char = '/';
#else
static char *Nulldev = "NUL";
static char Sep_char = '\\';
#endif /* WIN32 */
/*
* Private Routines
@@ -471,12 +466,7 @@ filepath(char *filename)
char basename[16];
int len;
#ifndef WIN32
if (*filename != Sep_char) {
#else
if (!(filename[1] == ':' && filename[2] == Sep_char)) {
#endif /* WIN32 */
/* Either /base/ or \base\ */
sprintf(basename, "%cbase%c", Sep_char, Sep_char);
@@ -576,9 +566,6 @@ fileNameOpenFile(FileName fileName,
close(tmpfd);
}
#ifdef WIN32
fileFlags |= _O_BINARY;
#endif /* WIN32 */
vfdP->fd = open(fileName,fileFlags,fileMode);
vfdP->fdstate = 0x0;

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.10 1997/01/26 20:15:00 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/ipc/Attic/s_lock.c,v 1.11 1997/02/14 04:16:43 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -37,10 +37,6 @@
* manual for POWER in any case.
*
*/
#ifdef WIN32
#include <windows.h>
#endif /* WIN32 */
#include "postgres.h"
#include "storage/ipc.h"
@@ -414,27 +410,3 @@ S_INIT_LOCK(slock_t *lock)
#endif /* HAS_TEST_AND_SET */
#ifdef WIN32
void
S_LOCK(HANDLE *lock)
{
int x = 0;
x = x / x;
}
void
S_UNLOCK(HANDLE *lock)
{
int x = 0;
x = x / x;
}
void
S_INIT_LOCK(HANDLE *lock)
{
int x = 0;
x = x / x;
}
#endif /*WIN32*/

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.16 1997/02/13 15:55:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.17 1997/02/14 04:16:56 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -46,12 +46,10 @@
* This is so that we can support more backends. (system-wide semaphore
* sets run out pretty fast.) -ay 4/95
*
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.16 1997/02/13 15:55:01 momjian Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/lmgr/proc.c,v 1.17 1997/02/14 04:16:56 momjian Exp $
*/
#include <sys/time.h>
#ifndef WIN32
#include <unistd.h>
#endif /* WIN32 */
#include <string.h>
#include <signal.h>
#include <sys/types.h>
@@ -157,9 +155,7 @@ InitProcess(IPCKey key)
* Routine called if deadlock timer goes off. See ProcSleep()
* ------------------
*/
#ifndef WIN32
pqsignal(SIGALRM, HandleDeadLock);
#endif /* WIN32 we'll have to figure out how to handle this later */
SpinAcquire(ProcStructLock);
@@ -456,9 +452,7 @@ ProcSleep(PROC_QUEUE *queue,
{
int i;
PROC *proc;
#ifndef WIN32 /* figure this out later */
struct itimerval timeval, dummy;
#endif /* WIN32 */
proc = (PROC *) MAKE_PTR(queue->links.prev);
for (i=0;i<queue->size;i++)
@@ -501,13 +495,11 @@ ProcSleep(PROC_QUEUE *queue,
* to 0.
* --------------
*/
#ifndef WIN32
memset(&timeval, 0, sizeof(struct itimerval));
timeval.it_value.tv_sec = DEADLOCK_TIMEOUT;
if (setitimer(ITIMER_REAL, &timeval, &dummy))
elog(FATAL, "ProcSleep: Unable to set timer for process wakeup");
#endif /* WIN32 */
/* --------------
* if someone wakes us between SpinRelease and IpcSemaphoreLock,
@@ -521,13 +513,11 @@ ProcSleep(PROC_QUEUE *queue,
* We were awoken before a timeout - now disable the timer
* ---------------
*/
#ifndef WIN32
timeval.it_value.tv_sec = 0;
if (setitimer(ITIMER_REAL, &timeval, &dummy))
elog(FATAL, "ProcSleep: Unable to diable timer for process wakeup");
#endif /* WIN32 */
/* ----------------
* We were assumed to be in a critical section when we went

View File

@@ -7,7 +7,7 @@
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.10 1996/11/27 07:24:02 vadim Exp $
* $Header: /cvsroot/pgsql/src/backend/storage/smgr/md.c,v 1.11 1997/02/14 04:17:08 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -154,10 +154,6 @@ mdunlink(Relation reln)
/* On Windows NT you can't unlink a file if it is open so we have
** to do this.
*/
#ifdef WIN32
(void) mdclose(reln);
#endif /* WIN32 */
memset(fname,0, NAMEDATALEN);
strncpy(fname, RelationGetRelationName(reln)->data, NAMEDATALEN);
@@ -167,9 +163,6 @@ mdunlink(Relation reln)
/* unlink all the overflow files for large relations */
for (i = 1; ; i++) {
#ifdef WIN32
(void) mdclose(reln);
#endif /* WIN32 */
sprintf(tname, "%s.%d", fname, i);
if (FileNameUnlink(tname) < 0)
break;