提交 cb90b2da 编写于 作者: T Tom Lane

Digging through previous discussion of this patch, I note where Peter E.

points out how silly it is to use Autoconf to test for a preprocessor
symbol, when one can equally easily #ifdef on the symbol itself.
Accordingly, revert configure to prior state and do it that way.
上级 bc042e0a
此差异已折叠。
...@@ -801,19 +801,6 @@ AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask s ...@@ -801,19 +801,6 @@ AC_CHECK_FUNCS([fcvt getopt_long memmove pstat setproctitle setsid sigprocmask s
dnl Check whether <unistd.h> declares fdatasync(). dnl Check whether <unistd.h> declares fdatasync().
AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL)) AC_EGREP_HEADER(fdatasync, unistd.h, AC_DEFINE(HAVE_FDATASYNC_DECL))
AC_MSG_CHECKING([for SO_PEERCRED])
AC_EGREP_CPP(HAVE_SO_PEERCRED,
#include <sys/socket.h>
#ifdef SO_PEERCRED
HAVE_SO_PEERCRED
#endif
],
[
AC_MSG_RESULT(yes)
AC_DEFINE(HAVE_SO_PEERCRED)
],
[AC_MSG_RESULT(no)])
AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS], AC_CACHE_CHECK([for PS_STRINGS], [pgac_cv_var_PS_STRINGS],
[AC_TRY_LINK( [AC_TRY_LINK(
[#include <machine/vmparam.h> [#include <machine/vmparam.h>
......
...@@ -5,7 +5,12 @@ ...@@ -5,7 +5,12 @@
* wherein you authenticate a user by seeing what IP address the system * wherein you authenticate a user by seeing what IP address the system
* says he comes from and possibly using ident). * says he comes from and possibly using ident).
* *
* $Id: hba.c,v 1.58 2001/08/01 23:25:39 tgl Exp $ * Portions Copyright (c) 1996-2001, PostgreSQL Global Development Group
* Portions Copyright (c) 1994, Regents of the University of California
*
*
* IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.59 2001/08/01 23:52:50 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -292,7 +297,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p) ...@@ -292,7 +297,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
if (port->auth_method == uaKrb4 || if (port->auth_method == uaKrb4 ||
port->auth_method == uaKrb5) port->auth_method == uaKrb5)
goto hba_syntax; goto hba_syntax;
#ifndef HAVE_SO_PEERCRED #ifndef SO_PEERCRED
if (port->auth_method == uaIdent) if (port->auth_method == uaIdent)
{ {
/* Give a special error message for this case... */ /* Give a special error message for this case... */
...@@ -861,7 +866,8 @@ ident_inet(const struct in_addr remote_ip_addr, ...@@ -861,7 +866,8 @@ ident_inet(const struct in_addr remote_ip_addr,
return ident_return; return ident_return;
} }
#ifdef HAVE_SO_PEERCRED #ifdef SO_PEERCRED
/* /*
* Ask kernel about the credentials of the connecting process and * Ask kernel about the credentials of the connecting process and
* determine the symbolic name of the corresponding user. * determine the symbolic name of the corresponding user.
...@@ -923,7 +929,8 @@ ident_unix(int sock, char *ident_user) ...@@ -923,7 +929,8 @@ ident_unix(int sock, char *ident_user)
return true; return true;
} }
#endif
#endif /* SO_PEERCRED */
/* /*
* Determine the username of the initiator of the connection described * Determine the username of the initiator of the connection described
...@@ -947,7 +954,7 @@ authident(hbaPort *port) ...@@ -947,7 +954,7 @@ authident(hbaPort *port)
port->laddr.in.sin_port, ident_user)) port->laddr.in.sin_port, ident_user))
return STATUS_ERROR; return STATUS_ERROR;
break; break;
#ifdef HAVE_SO_PEERCRED #ifdef SO_PEERCRED
case AF_UNIX: case AF_UNIX:
if (!ident_unix(port->sock, ident_user)) if (!ident_unix(port->sock, ident_user))
return STATUS_ERROR; return STATUS_ERROR;
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
* or in config.h afterwards. Of course, if you edit config.h, then your * or in config.h afterwards. Of course, if you edit config.h, then your
* changes will be overwritten the next time you run configure. * changes will be overwritten the next time you run configure.
* *
* $Id: config.h.in,v 1.169 2001/08/01 23:25:39 tgl Exp $ * $Id: config.h.in,v 1.170 2001/08/01 23:52:50 tgl Exp $
*/ */
#ifndef CONFIG_H #ifndef CONFIG_H
...@@ -685,9 +685,6 @@ extern int fdatasync(int fildes); ...@@ -685,9 +685,6 @@ extern int fdatasync(int fildes);
/* Define if you have on_exit() */ /* Define if you have on_exit() */
#undef HAVE_ON_EXIT #undef HAVE_ON_EXIT
/* Define if you have SO_PEERCRED */
#undef HAVE_SO_PEERCRED
/* /*
*------------------------------------------------------------------------ *------------------------------------------------------------------------
* Part 4: pull in system-specific declarations. * Part 4: pull in system-specific declarations.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册