git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Build on Debian GNU/Hurd

From
Gerrit Pape <pape@smarden.org>
Date
Sep 19, 2006, 17:03 UTC
Message-ID
<20060919170335.28054.qmail@14e0e1fe2bc371.315fe32.mid.smarden.org>
In-Reply-To
<7vr6yce5ky.fsf@assigned-by-dhcp.cox.net>
On Fri, Sep 15, 2006 at 10:35:57PM -0700, Junio C Hamano wrote:
Show 15 quoted lines
> Gerrit Pape <pape@smarden.org> writes:
> > Patch from Cyril Brulebois to make the build process detect and support the
> > Debian GNU/Hurd architecture, see
> >  http://bugs.debian.org/379841
> >
> > Signed-off-by: Gerrit Pape <pape@smarden.org>
> >
> > +ifeq ($(uname_S),GNU)
> > +       # GNU stands for GNU/Hurd
> > +       NO_STRLCPY = YesPlease
> > +       ALL_CFLAGS += -DPATH_MAX=4096
> > +endif
> 
> Two questions come to mind. (1) Does GNU stand for GNU/Hurd and
> nobody else? (2) Does everybody else have PATH_MAX?

I'm not that familiar with the Hurd, but (1) seems to be so according to http://www.gnu.org/software/hurd/hurd.html; it looks like either GNU or GNU/Hurd is used. (2) For IRIX64 PATH_MAX also is defined explicitly

 git$ grep -B7 -A3 PATH_MAX Makefile 
 ifeq ($(uname_S),IRIX64)
         NO_IPV6=YesPlease
         NO_SETENV=YesPlease
         NO_STRCASESTR=YesPlease
         NO_STRLCPY = YesPlease
         NO_SOCKADDR_STORAGE=YesPlease
         SHELL_PATH=/usr/gnu/bin/bash
         ALL_CFLAGS += -DPATH_MAX=1024
         # for now, build 32-bit version
         ALL_LDFLAGS += -L/usr/lib32
 endif
that's where I got it from.
> Adding NO_STRLCPY I do not have much problems with, but
> something like the attached may be cleaner to deal with PATH_MAX;
> of course now there is an issue of what the appropriate value
> for that symbol should be.

It's been so before it seems, I'm not sure why it changed. http://www.debian.org/ports/hurd/hurd-devel-debian says one cannot expect PATH_MAX to be defined on a POSIX system, so defining it conditionally IMHO is the right thing.

 git$ PAGER=cat git log -p 579d1fb..8e76483
 commit 8e76483ce0ce256b01345abc4ca97b1f94aed354
 Author: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
 Date:   Sun Jul 30 17:00:40 2006 +0100
 
     Fix header breakage due to redefining PATH_MAX.
     
     The header builtin.h was, incorrectly, redefining PATH_MAX which
     causes a header order dependency in builtin-write-tree.c.  The fix
     is to simply include <limits.h> directly to obtain the correct
     definition of PATH_MAX.
     
     Signed-off-by: Ramsay Allan Jones <ramsay@ramsay1.demon.co.uk>
     Signed-off-by: Junio C Hamano <junkio@cox.net>
 
 diff --git a/builtin.h b/builtin.h
 index 1c8637a..88c4d84 100644
 --- a/builtin.h
 +++ b/builtin.h
 @@ -2,10 +2,7 @@ #ifndef BUILTIN_H
  #define BUILTIN_H
  
  #include <stdio.h>
 -
 -#ifndef PATH_MAX
 -# define PATH_MAX 4096
 -#endif
 +#include <limits.h>
  
  extern const char git_version_string[];
  
HTH, Gerrit.
Previous: Junio C HamanoNext: Ramsay Jones
Message 4 of 7 in “Build on Debian GNU/Hurd”
  1. Build on Debian GNU/HurdGerrit Pape, Sep 15, 2006
  2. Martin WaitzSep 15, 2006
  3. Junio C HamanoSep 16, 2006
  4. Gerrit PapeSep 19, 2006
  5. Ramsay JonesSep 21, 2006
  6. Linus TorvaldsSep 21, 2006
  7. Ramsay JonesSep 22, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.