Use autoconf build-in sys_siglist macro AC_DECL_SYS_SIGLIST, rather than
create our own.
This commit is contained in:
parent
9bf559dee3
commit
91ed399517
52
configure
vendored
52
configure
vendored
@ -15600,9 +15600,9 @@ fi
|
|||||||
rm -f conftest.err conftest.$ac_objext \
|
rm -f conftest.err conftest.$ac_objext \
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
conftest$ac_exeext conftest.$ac_ext
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for sys_siglist" >&5
|
echo "$as_me:$LINENO: checking whether sys_siglist is declared" >&5
|
||||||
echo $ECHO_N "checking for sys_siglist... $ECHO_C" >&6
|
echo $ECHO_N "checking whether sys_siglist is declared... $ECHO_C" >&6
|
||||||
if test "${pgac_cv_var_sys_siglist+set}" = set; then
|
if test "${ac_cv_have_decl_sys_siglist+set}" = set; then
|
||||||
echo $ECHO_N "(cached) $ECHO_C" >&6
|
echo $ECHO_N "(cached) $ECHO_C" >&6
|
||||||
else
|
else
|
||||||
cat >conftest.$ac_ext <<_ACEOF
|
cat >conftest.$ac_ext <<_ACEOF
|
||||||
@ -15612,17 +15612,26 @@ cat confdefs.h >>conftest.$ac_ext
|
|||||||
cat >>conftest.$ac_ext <<_ACEOF
|
cat >>conftest.$ac_ext <<_ACEOF
|
||||||
/* end confdefs.h. */
|
/* end confdefs.h. */
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
|
/* NetBSD declares sys_siglist in unistd.h. */
|
||||||
|
#if HAVE_UNISTD_H
|
||||||
|
# include <unistd.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
int
|
int
|
||||||
main ()
|
main ()
|
||||||
{
|
{
|
||||||
extern char *sys_siglist[]; (void)sys_siglist[0];
|
#ifndef sys_siglist
|
||||||
|
char *p = (char *) sys_siglist;
|
||||||
|
#endif
|
||||||
|
|
||||||
;
|
;
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
_ACEOF
|
_ACEOF
|
||||||
rm -f conftest.$ac_objext conftest$ac_exeext
|
rm -f conftest.$ac_objext
|
||||||
if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
|
||||||
(eval $ac_link) 2>conftest.er1
|
(eval $ac_compile) 2>conftest.er1
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
grep -v '^ *+' conftest.er1 >conftest.err
|
grep -v '^ *+' conftest.er1 >conftest.err
|
||||||
rm -f conftest.er1
|
rm -f conftest.er1
|
||||||
@ -15636,32 +15645,41 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
|
|||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; } &&
|
(exit $ac_status); }; } &&
|
||||||
{ ac_try='test -s conftest$ac_exeext'
|
{ ac_try='test -s conftest.$ac_objext'
|
||||||
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
|
||||||
(eval $ac_try) 2>&5
|
(eval $ac_try) 2>&5
|
||||||
ac_status=$?
|
ac_status=$?
|
||||||
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
echo "$as_me:$LINENO: \$? = $ac_status" >&5
|
||||||
(exit $ac_status); }; }; then
|
(exit $ac_status); }; }; then
|
||||||
pgac_cv_var_sys_siglist=yes
|
ac_cv_have_decl_sys_siglist=yes
|
||||||
else
|
else
|
||||||
echo "$as_me: failed program was:" >&5
|
echo "$as_me: failed program was:" >&5
|
||||||
sed 's/^/| /' conftest.$ac_ext >&5
|
sed 's/^/| /' conftest.$ac_ext >&5
|
||||||
|
|
||||||
pgac_cv_var_sys_siglist=no
|
ac_cv_have_decl_sys_siglist=no
|
||||||
fi
|
fi
|
||||||
rm -f conftest.err conftest.$ac_objext \
|
rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
|
||||||
conftest$ac_exeext conftest.$ac_ext
|
|
||||||
fi
|
fi
|
||||||
echo "$as_me:$LINENO: result: $pgac_cv_var_sys_siglist" >&5
|
echo "$as_me:$LINENO: result: $ac_cv_have_decl_sys_siglist" >&5
|
||||||
echo "${ECHO_T}$pgac_cv_var_sys_siglist" >&6
|
echo "${ECHO_T}$ac_cv_have_decl_sys_siglist" >&6
|
||||||
if test x"$pgac_cv_var_sys_siglist" = x"yes"; then
|
if test $ac_cv_have_decl_sys_siglist = yes; then
|
||||||
|
|
||||||
cat >>confdefs.h <<\_ACEOF
|
cat >>confdefs.h <<_ACEOF
|
||||||
#define HAVE_SYS_SIGLIST 1
|
#define HAVE_DECL_SYS_SIGLIST 1
|
||||||
_ACEOF
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
|
else
|
||||||
|
cat >>confdefs.h <<_ACEOF
|
||||||
|
#define HAVE_DECL_SYS_SIGLIST 0
|
||||||
|
_ACEOF
|
||||||
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
echo "$as_me:$LINENO: checking for syslog" >&5
|
echo "$as_me:$LINENO: checking for syslog" >&5
|
||||||
echo $ECHO_N "checking for syslog... $ECHO_C" >&6
|
echo $ECHO_N "checking for syslog... $ECHO_C" >&6
|
||||||
if test "${ac_cv_func_syslog+set}" = set; then
|
if test "${ac_cv_func_syslog+set}" = set; then
|
||||||
|
11
configure.in
11
configure.in
@ -1,5 +1,5 @@
|
|||||||
dnl Process this file with autoconf to produce a configure script.
|
dnl Process this file with autoconf to produce a configure script.
|
||||||
dnl $PostgreSQL: pgsql/configure.in,v 1.498 2007/01/28 01:12:05 momjian Exp $
|
dnl $PostgreSQL: pgsql/configure.in,v 1.499 2007/01/28 03:50:33 momjian Exp $
|
||||||
dnl
|
dnl
|
||||||
dnl Developers, please strive to achieve this order:
|
dnl Developers, please strive to achieve this order:
|
||||||
dnl
|
dnl
|
||||||
@ -1059,14 +1059,7 @@ AC_TRY_LINK([#include <setjmp.h>],
|
|||||||
AC_MSG_RESULT(yes)],
|
AC_MSG_RESULT(yes)],
|
||||||
[AC_MSG_RESULT(no)])
|
[AC_MSG_RESULT(no)])
|
||||||
|
|
||||||
AC_CACHE_CHECK([for sys_siglist], pgac_cv_var_sys_siglist,
|
AC_DECL_SYS_SIGLIST
|
||||||
[AC_TRY_LINK([#include <signal.h>],
|
|
||||||
[extern char *sys_siglist[]; (void)sys_siglist[0];],
|
|
||||||
[pgac_cv_var_sys_siglist=yes],
|
|
||||||
[pgac_cv_var_sys_siglist=no])])
|
|
||||||
if test x"$pgac_cv_var_sys_siglist" = x"yes"; then
|
|
||||||
AC_DEFINE(HAVE_SYS_SIGLIST, 1, [Define to 1 if you have the global variable 'char *sys_siglist[]'.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
AC_CHECK_FUNC(syslog,
|
AC_CHECK_FUNC(syslog,
|
||||||
[AC_CHECK_HEADER(syslog.h,
|
[AC_CHECK_HEADER(syslog.h,
|
||||||
|
@ -37,7 +37,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.513 2007/01/28 01:12:05 momjian Exp $
|
* $PostgreSQL: pgsql/src/backend/postmaster/postmaster.c,v 1.514 2007/01/28 03:50:34 momjian Exp $
|
||||||
*
|
*
|
||||||
* NOTES
|
* NOTES
|
||||||
*
|
*
|
||||||
@ -2430,7 +2430,7 @@ LogChildExit(int lev, const char *procname, int pid, int exitstatus)
|
|||||||
(errmsg("%s (PID %d) was terminated by exception %X",
|
(errmsg("%s (PID %d) was terminated by exception %X",
|
||||||
procname, pid, WTERMSIG(exitstatus)),
|
procname, pid, WTERMSIG(exitstatus)),
|
||||||
errhint("See C include file \"ntstatus.h\" for a description of the hex value.")));
|
errhint("See C include file \"ntstatus.h\" for a description of the hex value.")));
|
||||||
#elif defined(HAVE_SYS_SIGLIST)
|
#elif defined(HAVE_DECL_SYS_SIGLIST)
|
||||||
ereport(lev,
|
ereport(lev,
|
||||||
|
|
||||||
/*------
|
/*------
|
||||||
|
@ -91,6 +91,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_STRLCPY
|
#undef HAVE_DECL_STRLCPY
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of `sys_siglist', and to 0 if you
|
||||||
|
don't. */
|
||||||
|
#undef HAVE_DECL_SYS_SIGLIST
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
|
/* Define to 1 if you have the declaration of `vsnprintf', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_VSNPRINTF
|
#undef HAVE_DECL_VSNPRINTF
|
||||||
@ -478,9 +482,6 @@
|
|||||||
/* Define to 1 if you have the <sys/shm.h> header file. */
|
/* Define to 1 if you have the <sys/shm.h> header file. */
|
||||||
#undef HAVE_SYS_SHM_H
|
#undef HAVE_SYS_SHM_H
|
||||||
|
|
||||||
/* Define to 1 if you have the global variable 'char *sys_siglist[]'. */
|
|
||||||
#undef HAVE_SYS_SIGLIST
|
|
||||||
|
|
||||||
/* Define to 1 if you have the <sys/socket.h> header file. */
|
/* Define to 1 if you have the <sys/socket.h> header file. */
|
||||||
#undef HAVE_SYS_SOCKET_H
|
#undef HAVE_SYS_SOCKET_H
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/port/exec.c,v 1.50 2007/01/28 02:33:09 momjian Exp $
|
* $PostgreSQL: pgsql/src/port/exec.c,v 1.51 2007/01/28 03:50:34 momjian Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -586,7 +586,7 @@ pclose_check(FILE *stream)
|
|||||||
#if defined(WIN32)
|
#if defined(WIN32)
|
||||||
log_error(_("child process was terminated by exception %X\nSee C include file \"ntstatus.h\" for a description of the hex value."),
|
log_error(_("child process was terminated by exception %X\nSee C include file \"ntstatus.h\" for a description of the hex value."),
|
||||||
WTERMSIG(exitstatus));
|
WTERMSIG(exitstatus));
|
||||||
#elif defined(HAVE_SYS_SIGLIST)
|
#elif defined(HAVE_DECL_SYS_SIGLIST)
|
||||||
log_error(_("child process was terminated by signal: %s"),
|
log_error(_("child process was terminated by signal: %s"),
|
||||||
WTERMSIG(exitstatus) < NSIG ?
|
WTERMSIG(exitstatus) < NSIG ?
|
||||||
sys_siglist[WTERMSIG(exitstatus)] : "unknown signal");
|
sys_siglist[WTERMSIG(exitstatus)] : "unknown signal");
|
||||||
|
Loading…
x
Reference in New Issue
Block a user