On Tue, Jul 25, 2006 at 08:20:28PM +0000, Cyril Brulebois wrote:
> When trying to build your package on hurd-i386, the following error is
> raised:
> > gcc -o checkout-index.o -c -g -Wall -O2 -DNO_OPENSSL
> > -DSHA1_HEADER='"mozilla-sha1/sha1.h"'  checkout-index.c
> > In file included from checkout-index.c:39:
> > cache.h:172: error: 'PATH_MAX' undeclared here (not in a function)
> > make[1]: *** [checkout-index.o] Error 1
> > make[1]: Leaving directory `/home/kibi/build/git-core-1.4.1'
> > make: *** [build-arch-stamp] Error 2

> A second problem is that GNU(/Hurd) is not detected by the Makefile;
> that's solved with the second patch I join, Makefile-GNU.diff.

> The last but not least problem resides in read-cache.c. In IS_ERR, an
> assumption is made: ENOENT, EINVAL and all error codes (errno) of
> the function 'lstat' are lower (in absolute value) than 1000, which is
> the case on many arch (e.g. on Linux) but that's not the case on Hurd.

Hi Cyril, thanks for the report.  With upstream version 1.4.2, the
IS_ERR() function is removed, and it looks like the error handling now
no longer assumes errno to be less than 1000 in these cases.  So it
seems only this patch to the Makefile is necessary, do you agree?

diff --git a/Makefile b/Makefile
index 0761d6c..e78ef18 100644
--- a/Makefile
+++ b/Makefile
@@ -342,6 +342,11 @@ ifeq ($(uname_S),NetBSD)
        ALL_CFLAGS += -I/usr/pkg/include
        ALL_LDFLAGS += -L/usr/pkg/lib -Wl,-rpath,/usr/pkg/lib
 endif
+ifeq ($(uname_S),GNU)
+       # GNU stands for GNU/Hurd
+       NO_STRLCPY = YesPlease
+       ALL_CFLAGS += -DPATH_MAX=4096
+endif
 ifeq ($(uname_S),AIX)
        NO_STRCASESTR=YesPlease
        NO_STRLCPY = YesPlease

Regards, Gerrit.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to