diff options
| author | Bruce Momjian | 2004-04-19 17:42:59 +0000 |
|---|---|---|
| committer | Bruce Momjian | 2004-04-19 17:42:59 +0000 |
| commit | 31338352bd89439c7c55d25c13d88338fa874771 (patch) | |
| tree | 318c34ab817a8d3e47b2fa6fa1c37ceacd8541a4 /src/include | |
| parent | 862b20b3822887bdb3b42a72ea0e73dc8028fb31 (diff) | |
* Most changes are to fix warnings issued when compiling win32
* removed a few redundant defines
* get_user_name safe under win32
* rationalized pipe read EOF for win32 (UPDATED PATCH USED)
* changed all backend instances of sleep() to pg_usleep
- except for the SLEEP_ON_ASSERT in assert.c, as it would exceed a
32-bit long [Note to patcher: If a SLEEP_ON_ASSERT of 2000 seconds is
acceptable, please replace with pg_usleep(2000000000L)]
I added a comment to that part of the code:
/*
* It would be nice to use pg_usleep() here, but only does 2000 sec
* or 33 minutes, which seems too short.
*/
sleep(1000000);
Claudio Natoli
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/port.h | 9 | ||||
| -rw-r--r-- | src/include/port/win32.h | 11 | ||||
| -rw-r--r-- | src/include/storage/ipc.h | 9 |
3 files changed, 17 insertions, 12 deletions
diff --git a/src/include/port.h b/src/include/port.h index e539d1f25db..93b549503fd 100644 --- a/src/include/port.h +++ b/src/include/port.h @@ -6,7 +6,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/port.h,v 1.24 2004/04/05 03:16:21 momjian Exp $ + * $PostgreSQL: pgsql/src/include/port.h,v 1.25 2004/04/19 17:42:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -48,7 +48,7 @@ extern off_t ftello(FILE *stream); #define pipewrite(a,b,c) write(a,b,c) #else extern int pgpipe(int handles[2]); -#define piperead(a,b,c) recv(a,b,c,0) +extern int piperead(int s, char* buf, int len); #define pipewrite(a,b,c) send(a,b,c,0) #endif @@ -70,6 +70,11 @@ extern int win32_open(const char*,int,...); #define open(a,b,...) win32_open(a,b,##__VA_ARGS__) #endif +#ifndef __BORLANDC__ +#define popen(a,b) _popen(a,b) +#define pclose(a) _pclose(a) +#endif + extern int copydir(char *fromdir, char *todir); /* Missing rand functions */ diff --git a/src/include/port/win32.h b/src/include/port/win32.h index d1e55725b9f..fb91e66468b 100644 --- a/src/include/port/win32.h +++ b/src/include/port/win32.h @@ -1,4 +1,4 @@ -/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.21 2004/04/12 16:19:18 momjian Exp $ */ +/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.22 2004/04/19 17:42:59 momjian Exp $ */ /* undefine and redefine after #include */ #undef mkdir @@ -6,6 +6,7 @@ #undef ERROR #include <windows.h> #include <winsock.h> +#include <process.h> #undef near /* Must be here to avoid conflicting with prototype in windows.h */ @@ -192,14 +193,6 @@ int setitimer(int which, const struct itimerval *value, struct itimerval *ovalue */ #define lstat slat -#define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) -#define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) - -#define S_IRUSR _S_IREAD -#define S_IWUSR _S_IWRITE -#define S_IXUSR _S_IEXEC -#define S_IRWXU (_S_IREAD | _S_IWRITE | _S_IEXEC) - /* * Supplement to <errno.h>. */ diff --git a/src/include/storage/ipc.h b/src/include/storage/ipc.h index 899198447f2..3dcfe41bfc1 100644 --- a/src/include/storage/ipc.h +++ b/src/include/storage/ipc.h @@ -11,7 +11,7 @@ * Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.65 2004/02/25 19:41:23 momjian Exp $ + * $PostgreSQL: pgsql/src/include/storage/ipc.h,v 1.66 2004/04/19 17:42:59 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -32,4 +32,11 @@ extern void on_exit_reset(void); extern void CreateSharedMemoryAndSemaphores(bool makePrivate, int maxBackends, int port); + +#ifdef EXEC_BACKEND +/* postmaster.c */ +extern size_t ShmemBackendArraySize(void); +extern void ShmemBackendArrayAllocation(void); +#endif + #endif /* IPC_H */ |
