diff options
author | Tom Lane | 2007-12-12 16:53:14 +0000 |
---|---|---|
committer | Tom Lane | 2007-12-12 16:53:14 +0000 |
commit | 580f3e4ef0a3b6c463cc6ffa9703bfefd5ef3209 (patch) | |
tree | e5fbdf384a0d8fc3161f31f67473038435e29fde | |
parent | 3dcfb4e337d2169192e1a6a2880272b835f9ddce (diff) |
Clean up unportable attempt to use #if inside a macro call, also
faulty code in third arm of #if. Per buildfarm reports.
-rw-r--r-- | src/backend/postmaster/pgarch.c | 37 |
1 files changed, 25 insertions, 12 deletions
diff --git a/src/backend/postmaster/pgarch.c b/src/backend/postmaster/pgarch.c index 6901549dcf..c5ee1475aa 100644 --- a/src/backend/postmaster/pgarch.c +++ b/src/backend/postmaster/pgarch.c @@ -489,29 +489,42 @@ pgarch_archiveXlog(char *xlog) if (WIFEXITED(rc)) { ereport(lev, - (errmsg("archive command failed with exit code %d", WEXITSTATUS(rc)), - errdetail("The failed archive command was: %s", xlogarchcmd))); + (errmsg("archive command failed with exit code %d", + WEXITSTATUS(rc)), + errdetail("The failed archive command was: %s", + xlogarchcmd))); } else if (WIFSIGNALED(rc)) { - ereport(lev, ( #if defined(WIN32) - errmsg("archive command was terminated by exception 0x%X", WTERMSIG(rc)), - errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), + ereport(lev, + (errmsg("archive command was terminated by exception 0x%X", + WTERMSIG(rc)), + errhint("See C include file \"ntstatus.h\" for a description of the hexadecimal value."), + errdetail("The failed archive command was: %s", + xlogarchcmd))); #elif defined(HAVE_DECL_SYS_SIGLIST) && HAVE_DECL_SYS_SIGLIST - errmsg("archive command was terminated by signal %d: %s", - WTERMSIG(rc), - WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"), + ereport(lev, + (errmsg("archive command was terminated by signal %d: %s", + WTERMSIG(rc), + WTERMSIG(rc) < NSIG ? sys_siglist[WTERMSIG(rc)] : "(unknown)"), + errdetail("The failed archive command was: %s", + xlogarchcmd))); #else - errmsg("archive command was terminated by signal %d", WTERMSIG(exitstatus)), + ereport(lev, + (errmsg("archive command was terminated by signal %d", + WTERMSIG(rc)), + errdetail("The failed archive command was: %s", + xlogarchcmd))); #endif - errdetail("The failed archive command was: %s", xlogarchcmd))); } else { ereport(lev, - (errmsg("archive command exited with unrecognized status %d", rc), - errdetail("The failed archive command was: %s", xlogarchcmd))); + (errmsg("archive command exited with unrecognized status %d", + rc), + errdetail("The failed archive command was: %s", + xlogarchcmd))); } return false; |