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

Commita2a36d5

Browse files
committed
Trust a few system headers to stand on their own
At some point in the past some headers (net/if.h on some BSDs in 2009,netinet/tcp.h on IRIX in 2000, sys/ucred.h in 2013 on then older openbsd),only compiled if other heades were included first, complicating configuretests. More recent tests indicate that that's not required anymore.Reviewed-By: Thomas Munro <thomas.munro@gmail.com>Discussion:https://postgr.es/m/20220807012914.ydz73yte6j3coulo@awork3.anarazel.de
1 parent20c105c commita2a36d5

File tree

2 files changed

+4
-76
lines changed

2 files changed

+4
-76
lines changed

‎configure

Lines changed: 1 addition & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -13874,7 +13874,7 @@ $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h
1387413874
fi
1387513875

1387613876

13877-
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/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/uio.h sys/un.h termios.h ucred.h
13877+
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.hnet/if.h netinet/tcp.hsys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/ucred.h sys/uio.h sys/un.h termios.h ucred.h
1387813878
do :
1387913879
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1388013880
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
@@ -13888,60 +13888,6 @@ fi
1388813888
done
1388913889

1389013890

13891-
# On BSD, test for net/if.h will fail unless sys/socket.h
13892-
# is included first.
13893-
for ac_header in net/if.h
13894-
do :
13895-
ac_fn_c_check_header_compile "$LINENO" "net/if.h" "ac_cv_header_net_if_h" "$ac_includes_default
13896-
#include <sys/socket.h>
13897-
13898-
"
13899-
if test "x$ac_cv_header_net_if_h" = xyes; then :
13900-
cat >>confdefs.h <<_ACEOF
13901-
#define HAVE_NET_IF_H 1
13902-
_ACEOF
13903-
13904-
fi
13905-
13906-
done
13907-
13908-
13909-
# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
13910-
# is included first.
13911-
for ac_header in sys/ucred.h
13912-
do :
13913-
ac_fn_c_check_header_compile "$LINENO" "sys/ucred.h" "ac_cv_header_sys_ucred_h" "$ac_includes_default
13914-
#include <sys/param.h>
13915-
13916-
"
13917-
if test "x$ac_cv_header_sys_ucred_h" = xyes; then :
13918-
cat >>confdefs.h <<_ACEOF
13919-
#define HAVE_SYS_UCRED_H 1
13920-
_ACEOF
13921-
13922-
fi
13923-
13924-
done
13925-
13926-
13927-
# At least on IRIX, test for netinet/tcp.h will fail unless
13928-
# netinet/in.h is included first.
13929-
for ac_header in netinet/tcp.h
13930-
do :
13931-
ac_fn_c_check_header_compile "$LINENO" "netinet/tcp.h" "ac_cv_header_netinet_tcp_h" "$ac_includes_default
13932-
#include <netinet/in.h>
13933-
13934-
"
13935-
if test "x$ac_cv_header_netinet_tcp_h" = xyes; then :
13936-
cat >>confdefs.h <<_ACEOF
13937-
#define HAVE_NETINET_TCP_H 1
13938-
_ACEOF
13939-
13940-
fi
13941-
13942-
done
13943-
13944-
1394513891
if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
1394613892
for ac_header in readline/readline.h
1394713893
do :

‎configure.ac

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1452,6 +1452,8 @@ AC_CHECK_HEADERS(m4_normalize([
14521452
ifaddrs.h
14531453
langinfo.h
14541454
mbarrier.h
1455+
net/if.h
1456+
netinet/tcp.h
14551457
sys/epoll.h
14561458
sys/event.h
14571459
sys/ipc.h
@@ -1464,33 +1466,13 @@ AC_CHECK_HEADERS(m4_normalize([
14641466
sys/shm.h
14651467
sys/signalfd.h
14661468
sys/sockio.h
1469+
sys/ucred.h
14671470
sys/uio.h
14681471
sys/un.h
14691472
termios.h
14701473
ucred.h
14711474
]))
14721475

1473-
# On BSD, test for net/if.h will fail unless sys/socket.h
1474-
# is included first.
1475-
AC_CHECK_HEADERS(net/if.h,[],[],
1476-
[AC_INCLUDES_DEFAULT
1477-
#include <sys/socket.h>
1478-
])
1479-
1480-
# On OpenBSD, test for sys/ucred.h will fail unless sys/param.h
1481-
# is included first.
1482-
AC_CHECK_HEADERS(sys/ucred.h,[],[],
1483-
[AC_INCLUDES_DEFAULT
1484-
#include <sys/param.h>
1485-
])
1486-
1487-
# At least on IRIX, test for netinet/tcp.h will fail unless
1488-
# netinet/in.h is included first.
1489-
AC_CHECK_HEADERS(netinet/tcp.h,[],[],
1490-
[AC_INCLUDES_DEFAULT
1491-
#include <netinet/in.h>
1492-
])
1493-
14941476
if expr x"$pgac_cv_check_readline" : 'x-lreadline' >/dev/null ; then
14951477
AC_CHECK_HEADERS(readline/readline.h,[],
14961478
[AC_CHECK_HEADERS(readline.h,[],

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp