[pkg-boost-devel] Bug#487343: boost: FTBFS on hurd-i386 because of unconditionnal PATH_MAX usage

Samuel Thibault samuel.thibault at ens-lyon.org
Sat Jun 21 02:38:27 UTC 2008


Package: boost
Severity: important
Tags: patch

Hello,

boost currently FTBFS on hurd-i386 because it unconditionnally uses
PATH_MAX in pwd.c.  The attached patch fixes that by taking advantage of
glibc's get_current_dir_name().

Samuel

-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (990, 'testing'), (500, 'oldstable'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)

Kernel: Linux 2.6.25
Locale: LANG=fr_FR at euro, LC_CTYPE=fr_FR at euro (charmap=ISO-8859-15)
Shell: /bin/sh linked to /bin/bash

-- 
Samuel
<A> sauf que le firewall bloque tout sauf internet
 -+- ben ouais, il bloque ipx/spx ! -+-
-------------- next part --------------
--- tools/jam/src/pwd.c.orig	2008-06-20 22:26:28.000000000 -0400
+++ tools/jam/src/pwd.c	2008-06-20 22:26:07.000000000 -0400
@@ -24,7 +24,9 @@
 /* The current directory can't change in bjam, so optimize this to cache
 ** the result.
 */
+#ifndef __GLIBC__
 static char pwd_buffer[PATH_MAX];
+#endif
 static char * pwd_result = NULL;
 
 
@@ -33,11 +35,16 @@
 {
     if (!pwd_result)
     {
+#ifdef __GLIBC__
+        if ((pwd_result = get_current_dir_name()) == NULL)
+#else
         if (getcwd(pwd_buffer, sizeof(pwd_buffer)) == NULL)
+#endif
         {
             perror("can not get current directory");
             return L0;
         }
+#ifndef __GLIBC__
         else
         {
 #ifdef NT
@@ -46,6 +53,7 @@
             pwd_result = newstr(pwd_buffer);
 #endif
         }
+#endif
     }
     return list_new(L0, pwd_result);
 }


More information about the pkg-boost-devel mailing list