From 219c3d3877b90c889fc9b2a6b6ef245298fbd9c4 Mon Sep 17 00:00:00 2001 From: Debian Med Packaging Team Date: Sat, 27 Jul 2024 22:38:52 -0400 Subject: [PATCH] fix portability issues that led to Hurd build failures * 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 Last-Update: 2020-09-19 Gbp-Pq: Name hurd_fixes --- c++/src/build-system/configure | 2 +- c++/src/build-system/configure.ac | 2 +- c++/src/connect/ncbi_localip.c | 2 +- c++/src/connect/ncbi_socket_cxx.cpp | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/c++/src/build-system/configure b/c++/src/build-system/configure index f3d5131a..a2f3f4a2 100755 --- a/c++/src/build-system/configure +++ b/c++/src/build-system/configure @@ -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 ) diff --git a/c++/src/build-system/configure.ac b/c++/src/build-system/configure.ac index 7f4f962a..9906d512 100644 --- a/c++/src/build-system/configure.ac +++ b/c++/src/build-system/configure.ac @@ -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 ) diff --git a/c++/src/connect/ncbi_localip.c b/c++/src/connect/ncbi_localip.c index f9a79588..a530ffd0 100644 --- a/c++/src/connect/ncbi_localip.c +++ b/c++/src/connect/ncbi_localip.c @@ -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 diff --git a/c++/src/connect/ncbi_socket_cxx.cpp b/c++/src/connect/ncbi_socket_cxx.cpp index 9b658656..b1d7ce9e 100644 --- a/c++/src/connect/ncbi_socket_cxx.cpp +++ b/c++/src/connect/ncbi_socket_cxx.cpp @@ -35,7 +35,7 @@ #include "ncbi_assert.h" // no _ASSERT()s, keep clean from xncbi #include #include // 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 -- 2.30.2