Re: pgsql: Provide a more accurate, detailed log message when the archive

From: Bjorn Munch <Bjorn(dot)Munch(at)sun(dot)com>
To: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Provide a more accurate, detailed log message when the archive
Date: 2007-12-12 13:17:43
Message-ID: 20071212131743.GA8400@atum07.norway.sun.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers

PostgreSQL fails to compile with Sun Studio 12, due to this new code
in backend/postmaster/pgarch.c, more precisely the last line before
the #endif (line 506):

-----
#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."),
#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)"),
#else
errmsg("archive command was terminated by signal %d", WTERMSIG(exitstatus)),
#endif
-----

Note the conditional compile here. The last case appears to have been
partly cut-and-pasted from postmaster.c as it refers to the variable
'exitstatus' which does not exist here, I suppose it should have been
'rc'?

It does work with Studio 11 (or gcc). Why Studio 12 causes configure
to undefine or unset HAVE_DECL_SYS_SIGLIST I haven't investigated. In
any case, the above may fail to compile also with other compilers.

- Bjorn Munch
Sun Microsystems
Database Technology Group, Trondheim, Norway

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2007-12-12 16:53:14 pgsql: Clean up unportable attempt to use #if inside a macro call, also
Previous Message User Conni 2007-12-12 12:49:47 press - pr: Corrections