Fix one more PATH_MAX assumption, in src/connect/ext/ncbi_localnet.c.
authorAaron M. Ucko <ucko@debian.org>
Sat, 11 Jun 2011 03:43:13 +0000 (03:43 +0000)
committerAaron M. Ucko <ucko@debian.org>
Sat, 11 Jun 2011 03:43:13 +0000 (03:43 +0000)
debian/patches/hurd_fixes

index 8341486d53d1c0347275b09a5d66f7856af818ff..84c70fc313a42cf4f623434023f936ad78630d3d 100644 (file)
@@ -2,8 +2,8 @@ Subject: fix portability issues that led to Hurd build failures
 
 * src/build-system/configure(.ac): when checking how select works, reset
   the alarm from the signal handler to avoid spinning forever.
-* src/connect/ncbi_socket_cxx.cpp: cope with missing PATH_MAX everywhere,
-  not just under Windows.
+* 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
@@ -46,3 +46,16 @@ Index: b/c++/src/connect/ncbi_socket_cxx.cpp
  #  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      2011-06-10 23:40:40.000000000 -0400
++++ b/c++/src/connect/ext/ncbi_localnet.c      2011-06-10 23:40: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