Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 2492fe4

Browse files
committed
Remove configure probe for netinet/tcp.h.
<netinet/tcp.h> is in SUSv3 and all targeted Unix systems have it. For Windows, we can provide a stub include file, to avoid some #ifdef noise. Discussion: https://postgr.es/m/CA+hUKGKErNfhmvb_H0UprEmp4LPzGN06yR2_0tYikjzB-2ECMw@mail.gmail.com
1 parent cce28f6 commit 2492fe4

File tree

15 files changed

+8
-26
lines changed

15 files changed

+8
-26
lines changed

configure

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13761,7 +13761,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1376113761
fi
1376213762

1376313763

13764-
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h netinet/tcp.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
13764+
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h sys/epoll.h sys/event.h sys/personality.h sys/prctl.h sys/procctl.h sys/signalfd.h sys/ucred.h termios.h ucred.h
1376513765
do :
1376613766
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1376713767
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

configure.ac

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1450,7 +1450,6 @@ AC_CHECK_HEADERS(m4_normalize([
14501450
ifaddrs.h
14511451
langinfo.h
14521452
mbarrier.h
1453-
netinet/tcp.h
14541453
sys/epoll.h
14551454
sys/event.h
14561455
sys/personality.h

src/backend/libpq/be-secure-openssl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
#include <unistd.h>
2525
#include <netdb.h>
2626
#include <netinet/in.h>
27-
#ifdef HAVE_NETINET_TCP_H
2827
#include <netinet/tcp.h>
2928
#include <arpa/inet.h>
30-
#endif
3129

3230
#include "libpq/libpq.h"
3331
#include "miscadmin.h"

src/backend/libpq/be-secure.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,8 @@
2424
#include <sys/socket.h>
2525
#include <netdb.h>
2626
#include <netinet/in.h>
27-
#ifdef HAVE_NETINET_TCP_H
2827
#include <netinet/tcp.h>
2928
#include <arpa/inet.h>
30-
#endif
3129

3230
#include "libpq/libpq.h"
3331
#include "miscadmin.h"

src/backend/libpq/ifaddr.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,7 @@
2424
#include <sys/socket.h>
2525
#include <netdb.h>
2626
#include <netinet/in.h>
27-
#ifdef HAVE_NETINET_TCP_H
2827
#include <netinet/tcp.h>
29-
#endif
3028
#include <sys/file.h>
3129

3230
#include "libpq/ifaddr.h"

src/backend/libpq/pqcomm.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,7 @@
6767
#include <sys/time.h>
6868
#include <netdb.h>
6969
#include <netinet/in.h>
70-
#ifdef HAVE_NETINET_TCP_H
7170
#include <netinet/tcp.h>
72-
#endif
7371
#include <utime.h>
7472
#ifdef _MSC_VER /* mstcpip.h is missing on mingw */
7573
#include <mstcpip.h>

src/common/ip.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,7 @@
2828
#include <sys/socket.h>
2929
#include <netdb.h>
3030
#include <netinet/in.h>
31-
#ifdef HAVE_NETINET_TCP_H
3231
#include <netinet/tcp.h>
33-
#endif
3432
#include <arpa/inet.h>
3533
#include <sys/file.h>
3634

src/include/libpq/libpq-be.h

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,7 @@
2323
#include <openssl/ssl.h>
2424
#include <openssl/err.h>
2525
#endif
26-
#ifdef HAVE_NETINET_TCP_H
2726
#include <netinet/tcp.h>
28-
#endif
2927

3028
#ifdef ENABLE_GSS
3129
#if defined(HAVE_GSSAPI_H)

src/include/pg_config.h.in

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,9 +322,6 @@
322322
/* Define to 1 if you have the `mkdtemp' function. */
323323
#undef HAVE_MKDTEMP
324324

325-
/* Define to 1 if you have the <netinet/tcp.h> header file. */
326-
#undef HAVE_NETINET_TCP_H
327-
328325
/* Define to 1 if you have the `OPENSSL_init_ssl' function. */
329326
#undef HAVE_OPENSSL_INIT_SSL
330327

src/include/port/win32/netinet/tcp.h

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
/* src/include/port/win32/netinet/tcp.h */
2+
#ifndef WIN32_NETINET_TCP_H
3+
#define WIN32_NETINET_TCP_H
4+
5+
#include <sys/socket.h>
6+
7+
#endif

src/interfaces/libpq/fe-connect.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,8 @@
5151
#include <sys/socket.h>
5252
#include <netdb.h>
5353
#include <netinet/in.h>
54-
#ifdef HAVE_NETINET_TCP_H
5554
#include <netinet/tcp.h>
5655
#endif
57-
#endif
5856

5957
#ifdef ENABLE_THREAD_SAFETY
6058
#ifdef WIN32

src/interfaces/libpq/fe-protocol3.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,8 @@
2121
#include "win32.h"
2222
#else
2323
#include <unistd.h>
24-
#ifdef HAVE_NETINET_TCP_H
2524
#include <netinet/tcp.h>
2625
#endif
27-
#endif
2826

2927
#include "libpq-fe.h"
3028
#include "libpq-int.h"

src/interfaces/libpq/fe-secure-openssl.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@
3838
#include <unistd.h>
3939
#include <netdb.h>
4040
#include <netinet/in.h>
41-
#ifdef HAVE_NETINET_TCP_H
4241
#include <netinet/tcp.h>
43-
#endif
4442
#include <arpa/inet.h>
4543
#endif
4644

src/interfaces/libpq/fe-secure.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@
2929
#include <unistd.h>
3030
#include <netdb.h>
3131
#include <netinet/in.h>
32-
#ifdef HAVE_NETINET_TCP_H
3332
#include <netinet/tcp.h>
34-
#endif
3533
#include <arpa/inet.h>
3634
#endif
3735

src/tools/msvc/Solution.pm

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ sub GenerateFiles
304304
HAVE_MEMORY_H => 1,
305305
HAVE_MEMSET_S => undef,
306306
HAVE_MKDTEMP => undef,
307-
HAVE_NETINET_TCP_H => undef,
308307
HAVE_OPENSSL_INIT_SSL => undef,
309308
HAVE_OSSP_UUID_H => undef,
310309
HAVE_PAM_PAM_APPL_H => undef,

0 commit comments

Comments
 (0)