Thanks to visit codestin.com
Credit goes to github.com

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

0 commit comments

Comments
 (0)