@@ -2713,12 +2713,14 @@ else
27132713 fi
27142714fi
27152715
2716- # The Intel compiler on Linux supports most gcc options, but not
2717- # all of them, so only add these options if we are really using
2718- # gcc.
2716+ # Some versions of GCC support some additional useful warning flags.
2717+ # Check whether they are supported, and add them to CFLAGS if so.
27192718
27202719if test "$GCC" = yes; then
27212720
2721+ # ICC pretends to be GCC but it's lying; it doesn't support these options.
2722+ # So we have to check if "GCC" is really ICC.
2723+
27222724cat >conftest.$ac_ext <<_ACEOF
27232725/* confdefs.h. */
27242726_ACEOF
@@ -2766,11 +2768,10 @@ sed 's/^/| /' conftest.$ac_ext >&5
27662768ICC=no
27672769fi
27682770rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
2771+
27692772 if test "$ICC" = no; then
27702773 CFLAGS="$CFLAGS -Wall -Wmissing-prototypes -Wpointer-arith -Winline"
27712774
2772- # Some versions of GCC support some additional useful warning flags.
2773- # Check whether they are supported, and add them to CFLAGS if so.
27742775 echo "$as_me:$LINENO: checking if $CC supports -Wdeclaration-after-statement" >&5
27752776echo $ECHO_N "checking if $CC supports -Wdeclaration-after-statement... $ECHO_C" >&6
27762777pgac_save_CFLAGS=$CFLAGS
@@ -21621,29 +21622,38 @@ esac
2162121622
2162221623
2162321624# Select semaphore implementation type.
21624- if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
21625+ if test "$PORTNAME" != "win32"; then
21626+ if test x"$USE_NAMED_POSIX_SEMAPHORES" = x"1" ; then
2162521627
2162621628cat >>confdefs.h <<\_ACEOF
2162721629#define USE_NAMED_POSIX_SEMAPHORES 1
2162821630_ACEOF
2162921631
21630- SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21631- else
21632- if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
21632+ SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21633+ else
21634+ if test x"$USE_UNNAMED_POSIX_SEMAPHORES" = x"1" ; then
2163321635
2163421636cat >>confdefs.h <<\_ACEOF
2163521637#define USE_UNNAMED_POSIX_SEMAPHORES 1
2163621638_ACEOF
2163721639
21638- SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21639- else
21640+ SEMA_IMPLEMENTATION="src/backend/port/posix_sema.c"
21641+ else
2164021642
2164121643cat >>confdefs.h <<\_ACEOF
2164221644#define USE_SYSV_SEMAPHORES 1
2164321645_ACEOF
2164421646
21645- SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21647+ SEMA_IMPLEMENTATION="src/backend/port/sysv_sema.c"
21648+ fi
2164621649 fi
21650+ else
21651+
21652+ cat >>confdefs.h <<\_ACEOF
21653+ #define USE_WIN32_SEMAPHORES 1
21654+ _ACEOF
21655+
21656+ SEMA_IMPLEMENTATION="src/backend/port/win32_sema.c"
2164721657fi
2164821658
2164921659
0 commit comments