fix portability issues that led to Hurd build failures
authorDebian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Tue, 5 Sep 2023 02:40:42 +0000 (22:40 -0400)
committerAaron M. Ucko <ucko@debian.org>
Tue, 5 Sep 2023 02:40:42 +0000 (22:40 -0400)
* src/build-system/configure(.ac):
  - Reflect the Hurd's support for -Wl,rpath,... .
* src/connect/ncbi_socket_cxx.cpp, src/connect/ext/ncbi_localnet.c:
  cope with missing PATH_MAX everywhere, not just under Windows.

Author: Aaron M. Ucko <ucko@debian.org>
Last-Update: 2020-09-19

Gbp-Pq: Name hurd_fixes

c++/src/build-system/configure
c++/src/build-system/configure.ac
c++/src/connect/ncbi_socket_cxx.cpp

index c06295aea053f9bf9690023f733ddcc5a4c2912c..50a906203ded9bb1bfec3464481ba628c827ad83 100755 (executable)
@@ -10464,7 +10464,7 @@ if test -z "$CONF_f_runpath" ; then
       CONF_f_runpath="-R"
       ;;
     linux*:[GI]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \
-    | osf*:GCC )
+    | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     irix*:* | linux*:KCC | *:Compaq )
index e0959ce4b997d93196b2ab07667a94389be28ef9..370a82ec8062e598d6030e4b6e8f328bdb7b9b52 100644 (file)
@@ -2257,7 +2257,7 @@ if test -z "$CONF_f_runpath" ; then
       CONF_f_runpath="-R"
       ;;
     linux*:[[GI]]CC | linux*Clang | *bsd*:GCC | *bsd*Clang | cygwin*:GCC \
-    | osf*:GCC )
+    | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     irix*:* | linux*:KCC | *:Compaq )
index 00c3a15883ddaa2331cc9f03c8bd375e81c01695..9b0a9131166d033e28b3f89680cd4307e179f5fd 100644 (file)
@@ -35,7 +35,7 @@
 #include "ncbi_assert.h"                // no _ASSERT()s, keep clean from xncbi
 #include <connect/ncbi_socket_unix.hpp>
 #include <limits.h>                     // for PATH_MAX
-#if defined(NCBI_OS_MSWIN)  &&  !defined(PATH_MAX)
+#ifndef PATH_MAX
 #  define PATH_MAX 512                  // will actually use less than 32 chars
 #endif // NCBI_OS_MSWIN && !PATH_MAX