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

Commit71b0fe5

Browse files
committed
Workaround for platforms that have getaddrinfo() without AI_NUMERICHOST.
We don't actually need the flag, so just #define it as zero in such cases.
1 parent2b5f049 commit71b0fe5

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

‎src/include/getaddrinfo.h

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
*
1616
* Copyright (c) 2003, PostgreSQL Global Development Group
1717
*
18-
* $Id: getaddrinfo.h,v 1.10 2003/08/08 21:42:31 momjian Exp $
18+
* $Id: getaddrinfo.h,v 1.11 2003/08/14 18:32:55 tgl Exp $
1919
*
2020
*-------------------------------------------------------------------------
2121
*/
@@ -31,7 +31,6 @@
3131
/* Various macros that ought to be in <netdb.h>, but might not be */
3232

3333
#ifndefEAI_FAIL
34-
3534
#defineEAI_BADFLAGS-1
3635
#defineEAI_NONAME-2
3736
#defineEAI_AGAIN-3
@@ -46,9 +45,18 @@
4645
#ifndefAI_PASSIVE
4746
#defineAI_PASSIVE0x0001
4847
#endif
48+
4949
#ifndefAI_NUMERICHOST
50+
/*
51+
* some platforms don't support AI_NUMERICHOST; define as zero if using
52+
* the system version of getaddrinfo...
53+
*/
54+
#if defined(HAVE_STRUCT_ADDRINFO)&& defined(HAVE_GETADDRINFO)
55+
#defineAI_NUMERICHOST0
56+
#else
5057
#defineAI_NUMERICHOST0x0004
5158
#endif
59+
#endif
5260

5361
#ifndefNI_NUMERICHOST
5462
#defineNI_NUMERICHOST1

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp