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

Commitc5f5b4d

Browse files
committed
Test honestly for <sys/signalfd.h>.
Commit6a2a70a supposed that any platform having <sys/epoll.h>would also have <sys/signalfd.h>. It turns out there are still afew people using platforms where that's not so, so we'd better makea separate configure probe for it. But since it took this long tonotice, I'm content with the decision to not have a separate codepath for epoll-only machines; we'll just fall back to using poll()for these stragglers.Per gripe from Gabriela Serventi. Back-patch to v14 where thiscode came in.Discussion:https://postgr.es/m/CAHOHWE-JjJDfcYuLAAEO7Jk07atFAU47z8TzHzg71gbC0aMy=g@mail.gmail.com
1 parentf48385c commitc5f5b4d

File tree

5 files changed

+10
-6
lines changed

5 files changed

+10
-6
lines changed

‎configure

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

1359813598

13599-
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
13599+
for ac_header in atomic.h copyfile.h execinfo.h getopt.h ifaddrs.h langinfo.h mbarrier.h poll.h sys/epoll.h sys/event.h sys/ipc.h sys/personality.h sys/prctl.h sys/procctl.h sys/pstat.h sys/resource.h sys/select.h sys/sem.h sys/shm.h sys/signalfd.h sys/sockio.h sys/tas.h sys/uio.h sys/un.h termios.h ucred.h wctype.h
1360013600
do :
1360113601
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
1360213602
ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"

‎configure.ac

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1412,6 +1412,7 @@ AC_CHECK_HEADERS(m4_normalize([
14121412
sys/select.h
14131413
sys/sem.h
14141414
sys/shm.h
1415+
sys/signalfd.h
14151416
sys/sockio.h
14161417
sys/tas.h
14171418
sys/uio.h

‎src/backend/storage/ipc/latch.c

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,9 @@
4343
#ifdefHAVE_SYS_EVENT_H
4444
#include<sys/event.h>
4545
#endif
46+
#ifdefHAVE_SYS_SIGNALFD_H
47+
#include<sys/signalfd.h>
48+
#endif
4649
#ifdefHAVE_POLL_H
4750
#include<poll.h>
4851
#endif
@@ -69,7 +72,7 @@
6972
#if defined(WAIT_USE_EPOLL)|| defined(WAIT_USE_POLL)|| \
7073
defined(WAIT_USE_KQUEUE)|| defined(WAIT_USE_WIN32)
7174
/* don't overwrite manual choice */
72-
#elif defined(HAVE_SYS_EPOLL_H)
75+
#elif defined(HAVE_SYS_EPOLL_H)&& defined(HAVE_SYS_SIGNALFD_H)
7376
#defineWAIT_USE_EPOLL
7477
#elif defined(HAVE_KQUEUE)
7578
#defineWAIT_USE_KQUEUE
@@ -81,10 +84,6 @@
8184
#error "no wait set implementation available"
8285
#endif
8386

84-
#ifdefWAIT_USE_EPOLL
85-
#include<sys/signalfd.h>
86-
#endif
87-
8887
/* typedef in latch.h */
8988
structWaitEventSet
9089
{

‎src/include/pg_config.h.in

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -634,6 +634,9 @@
634634
/* Define to 1 if you have the <sys/shm.h> header file. */
635635
#undef HAVE_SYS_SHM_H
636636

637+
/* Define to 1 if you have the <sys/signalfd.h> header file. */
638+
#undef HAVE_SYS_SIGNALFD_H
639+
637640
/* Define to 1 if you have the <sys/sockio.h> header file. */
638641
#undef HAVE_SYS_SOCKIO_H
639642

‎src/tools/msvc/Solution.pm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -404,6 +404,7 @@ sub GenerateFiles
404404
HAVE_SYS_SELECT_H=>undef,
405405
HAVE_SYS_SEM_H=>undef,
406406
HAVE_SYS_SHM_H=>undef,
407+
HAVE_SYS_SIGNALFD_H=>undef,
407408
HAVE_SYS_SOCKIO_H=>undef,
408409
HAVE_SYS_STAT_H=> 1,
409410
HAVE_SYS_TAS_H=>undef,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp