fix portability issues that led to Hurd build failures
authorDebian Med Packaging Team <debian-med-packaging@lists.alioth.debian.org>
Wed, 7 Aug 2024 01:45:09 +0000 (21:45 -0400)
committerAaron M. Ucko <ucko@debian.org>
Wed, 7 Aug 2024 01:45:09 +0000 (21:45 -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_localip.c
c++/src/connect/ncbi_socket_cxx.cpp

index f3d5131a79dc86978fae6a3e1dafe8390b43366d..a2f3f4a2ba879a3e330069729e6bb9b5f0fa1feb 100755 (executable)
@@ -10806,7 +10806,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 7f4f962ac8f032b391f575827bd20d310f88a076..9906d512d35654fcedb9576587ebdf51a4451ea9 100644 (file)
@@ -2424,7 +2424,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 f9a795883cb35e2edd1e8907bc8f614d2458b839..a530ffd0ee8ad23c97a1a37e9dc0ffccde4861ca 100644 (file)
@@ -67,7 +67,7 @@
 #  define INADDR_LOOPBACK  0x7F000001
 #endif /*!INADDR_LOOPBACK*/
 
-#if defined(NCBI_OS_MSWIN)  &&  !defined(PATH_MAX)
+#if /* defined(NCBI_OS_MSWIN)  && */ !defined(PATH_MAX)
 #  ifdef _MAX_PATH
 #    define PATH_MAX  _MAX_PATH
 #else
index 9b65865674576e670ae2b5e688b7730b387d0533..b1d7ce9e10f91ac7d8e3b3a20e4e3bb96ff63f08 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