diff options
author | Bruce Momjian <bruce@momjian.us> | 2006-07-30 01:45:21 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2006-07-30 01:45:21 +0000 |
commit | 1a271f0c71294c47444a15d93bc064d3a4f23674 (patch) | |
tree | e2ff357a47ea93dc18157434855696557e25194c /src/include/port/win32.h | |
parent | 497d39d76815a54917c4907c73451ecb715b1fe2 (diff) | |
download | postgresql-1a271f0c71294c47444a15d93bc064d3a4f23674.tar.gz postgresql-1a271f0c71294c47444a15d93bc064d3a4f23674.zip |
Fix WIN32 wait() return value macros to be accurate, particularly
because they are used for testing the return value from system().
(WIN32 doesn't overlay the return code with other failure conditions
like Unix does, so they are just simple macros.)
Fix regression checks to properly handle diff failures on Win32 using
the new macros.
Diffstat (limited to 'src/include/port/win32.h')
-rw-r--r-- | src/include/port/win32.h | 17 |
1 files changed, 11 insertions, 6 deletions
diff --git a/src/include/port/win32.h b/src/include/port/win32.h index 7a9180ea9c8..fa57c25b3c2 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.53 2006/07/16 20:17:04 tgl Exp $ */ +/* $PostgreSQL: pgsql/src/include/port/win32.h,v 1.54 2006/07/30 01:45:21 momjian Exp $ */ /* undefine and redefine after #include */ #undef mkdir @@ -109,12 +109,17 @@ int semop(int semId, struct sembuf * sops, int flag); /* - * Signal stuff + * Signal stuff + * WIN32 doesn't have wait(), so the return value for children + * is simply the return value specified by the child, without + * any additional information on whether the child terminated + * on its own or via a signal. These macros are also used + * to interpret the return value of system(). */ -#define WEXITSTATUS(w) (((w) >> 8) & 0xff) -#define WIFEXITED(w) (((w) & 0xff) == 0) -#define WIFSIGNALED(w) (((w) & 0x7f) > 0 && (((w) & 0x7f) < 0x7f)) -#define WTERMSIG(w) ((w) & 0x7f) +#define WEXITSTATUS(w) (w) +#define WIFEXITED(w) (true) +#define WIFSIGNALED(w) (false) +#define WTERMSIG(w) (0) #define sigmask(sig) ( 1 << ((sig)-1) ) |