Subject: fix portability issues that led to Hurd build failures

* src/build-system/configure(.ac):
  - Reflect the Hurd's support for -Wl,rpath,... .
  - When checking how select works, reset the alarm from the signal handler
    to avoid spinning forever.
* 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: 2011-06-10
Index: b/c++/src/build-system/configure
===================================================================
--- a/c++/src/build-system/configure	2011-03-16 14:40:24.000000000 -0400
+++ b/c++/src/build-system/configure	2011-08-29 12:12:56.000000000 -0400
@@ -5559,7 +5559,7 @@
     solaris* )
       CONF_f_runpath="-R"
       ;;
-    linux*:GCC | *bsd*:GCC | cygwin*:GCC | osf*:GCC )
+    linux*:GCC | *bsd*:GCC | cygwin*:GCC | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     linux*:ICC )
@@ -11416,7 +11416,7 @@
          #ifdef HAVE_UNISTD_H
          #  include <unistd.h>
          #endif
-         RETSIGTYPE handler(int sig) { }
+         RETSIGTYPE handler(int sig) { alarm(0); }
 int
 main ()
 {
Index: b/c++/src/build-system/configure.ac
===================================================================
--- a/c++/src/build-system/configure.ac	2011-03-16 14:40:24.000000000 -0400
+++ b/c++/src/build-system/configure.ac	2011-08-29 12:12:41.000000000 -0400
@@ -1441,7 +1441,7 @@
     solaris* )
       CONF_f_runpath="-R"
       ;;
-    linux*:GCC | *bsd*:GCC | cygwin*:GCC | osf*:GCC )
+    linux*:GCC | *bsd*:GCC | cygwin*:GCC | osf*:GCC | gnu*:GCC )
       CONF_f_runpath="-Wl,-rpath,"
       ;;
     linux*:ICC )
@@ -2811,7 +2811,7 @@
          #ifdef HAVE_UNISTD_H
          #  include <unistd.h>
          #endif
-         RETSIGTYPE handler(int sig) { }]],
+         RETSIGTYPE handler(int sig) { alarm(0); }]],
        [[struct timeval timeout = { 5, 0 };
          signal(SIGALRM, &handler);
          alarm(1);
Index: b/c++/src/connect/ncbi_socket_cxx.cpp
===================================================================
--- a/c++/src/connect/ncbi_socket_cxx.cpp	2011-03-16 10:54:49.000000000 -0400
+++ b/c++/src/connect/ncbi_socket_cxx.cpp	2011-08-29 12:11:45.000000000 -0400
@@ -34,7 +34,7 @@
 #include <ncbi_pch.hpp>
 #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
 
Index: b/c++/src/connect/ext/ncbi_localnet.c
===================================================================
--- a/c++/src/connect/ext/ncbi_localnet.c	2010-03-22 12:11:37.000000000 -0400
+++ b/c++/src/connect/ext/ncbi_localnet.c	2011-08-29 12:11:45.000000000 -0400
@@ -64,6 +64,8 @@
 
 #if defined(NCBI_OS_MSWIN) && !defined(PATH_MAX)
 #  define PATH_MAX _MAX_PATH
+#elif !defined(PATH_MAX)
+#  define PATH_MAX 4096
 #endif /*NCBI_OS_MSWIN && !PATH_MAX*/
 
 #if PATH_MAX < 256
