Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita4566a7

Browse files
committed
Clean up gcc warning, fix inappropriate choice of configuration symbol.
1 parent3261612 commita4566a7

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

‎src/backend/libpq/pqcomm.c

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
3030
* Portions Copyright (c) 1994, Regents of the University of California
3131
*
32-
*$Id: pqcomm.c,v 1.104 2000/10/03 03:11:14 momjian Exp $
32+
*$Id: pqcomm.c,v 1.105 2000/10/05 20:18:33 tgl Exp $
3333
*
3434
*-------------------------------------------------------------------------
3535
*/
@@ -172,12 +172,10 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
172172
SockAddrsaddr;
173173
intfd,
174174
err;
175-
size_tlen;
175+
size_tlen=0;
176176
intone=1;
177-
178177
#ifdefHAVE_FCNTL_SETLK
179178
intlock_fd;
180-
181179
#endif
182180

183181
Assert(family==AF_INET||family==AF_UNIX);
@@ -209,11 +207,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
209207
MemSet((char*)&saddr,0,sizeof(saddr));
210208
saddr.sa.sa_family=family;
211209

212-
/* I know this isn't a good way of testing, but until we have a
213-
* define for this it'll do!
214-
* we have Unix sockets...
215-
*/
216-
#ifdefHAVE_SYS_UN_H
210+
#ifdefHAVE_UNIX_SOCKETS
217211
if (family==AF_UNIX)
218212
{
219213
len=UNIXSOCK_PATH(saddr.un,portName);
@@ -236,7 +230,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
236230
}
237231
#endif/* HAVE_FCNTL_SETLK */
238232
}
239-
#endif/*HAVE_SYS_UN_H */
233+
#endif/*HAVE_UNIX_SOCKETS */
240234

241235
if (family==AF_INET)
242236
{
@@ -266,7 +260,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
266260
returnSTATUS_ERROR;
267261
}
268262

269-
#ifdefHAVE_SYS_UN_H/* yeah I know... */
263+
#ifdefHAVE_UNIX_SOCKETS
270264
if (family==AF_UNIX)
271265
{
272266
on_proc_exit(StreamDoUnlink,0);
@@ -288,7 +282,7 @@ StreamServerPort(int family, unsigned short portName, int *fdP)
288282
}
289283
#endif/* HAVE_FCNTL_SETLK */
290284
}
291-
#endif/*HAVE_SYS_UN_H */
285+
#endif/*HAVE_UNIX_SOCKETS */
292286

293287
listen(fd,SOMAXCONN);
294288

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp