Commit a4566a7a authored by Tom Lane's avatar Tom Lane

Clean up gcc warning, fix inappropriate choice of configuration symbol.

parent 32616129
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc * Portions Copyright (c) 1996-2000, PostgreSQL, Inc
* Portions Copyright (c) 1994, Regents of the University of California * Portions Copyright (c) 1994, Regents of the University of California
* *
* $Id: pqcomm.c,v 1.104 2000/10/03 03:11:14 momjian Exp $ * $Id: pqcomm.c,v 1.105 2000/10/05 20:18:33 tgl Exp $
* *
*------------------------------------------------------------------------- *-------------------------------------------------------------------------
*/ */
...@@ -172,12 +172,10 @@ StreamServerPort(int family, unsigned short portName, int *fdP) ...@@ -172,12 +172,10 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
SockAddr saddr; SockAddr saddr;
int fd, int fd,
err; err;
size_t len; size_t len = 0;
int one = 1; int one = 1;
#ifdef HAVE_FCNTL_SETLK #ifdef HAVE_FCNTL_SETLK
int lock_fd; int lock_fd;
#endif #endif
Assert(family == AF_INET || family == AF_UNIX); Assert(family == AF_INET || family == AF_UNIX);
...@@ -209,11 +207,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP) ...@@ -209,11 +207,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
MemSet((char *) &saddr, 0, sizeof(saddr)); MemSet((char *) &saddr, 0, sizeof(saddr));
saddr.sa.sa_family = family; saddr.sa.sa_family = family;
/* I know this isn't a good way of testing, but until we have a #ifdef HAVE_UNIX_SOCKETS
* define for this it'll do!
* we have Unix sockets...
*/
#ifdef HAVE_SYS_UN_H
if (family == AF_UNIX) if (family == AF_UNIX)
{ {
len = UNIXSOCK_PATH(saddr.un, portName); len = UNIXSOCK_PATH(saddr.un, portName);
...@@ -236,7 +230,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP) ...@@ -236,7 +230,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
} }
#endif /* HAVE_FCNTL_SETLK */ #endif /* HAVE_FCNTL_SETLK */
} }
#endif /* HAVE_SYS_UN_H */ #endif /* HAVE_UNIX_SOCKETS */
if (family == AF_INET) if (family == AF_INET)
{ {
...@@ -266,7 +260,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP) ...@@ -266,7 +260,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
return STATUS_ERROR; return STATUS_ERROR;
} }
#ifdef HAVE_SYS_UN_H /* yeah I know... */ #ifdef HAVE_UNIX_SOCKETS
if (family == AF_UNIX) if (family == AF_UNIX)
{ {
on_proc_exit(StreamDoUnlink, 0); on_proc_exit(StreamDoUnlink, 0);
...@@ -288,7 +282,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP) ...@@ -288,7 +282,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
} }
#endif /* HAVE_FCNTL_SETLK */ #endif /* HAVE_FCNTL_SETLK */
} }
#endif /* HAVE_SYS_UN_H */ #endif /* HAVE_UNIX_SOCKETS */
listen(fd, SOMAXCONN); listen(fd, SOMAXCONN);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment