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

Re: [PATCH v3] Replace hard-coded path with one from <paths.h>

From
Jakub Narebski <jnareb@gmail.com>
Date
Apr 15, 2010, 12:57 UTC
Message-ID
<201004151458.02156.jnareb@gmail.com>
In-Reply-To
<20100415124043.GH12365@arachsys.com>
On Thu, 15 April 2010, Chris Webb wrote:
Show 15 quoted lines
> Jakub Narebski <jnareb@gmail.com> writes:
> 
> > All other such variables are described at the top of main Makefile,
> > for example:
> > 
> >   #
> >   # Define NO_LIBGEN_H if you don't have libgen.h.
> > 
> > I think that HAVE_PATHS_H should also have such one-line description.
> > By the way it the very first variable with HAVE_* rather than NEEDS_*
> > or NO_* name.
> 
> To be honest, I used the name suggested to me earlier in the thread without
> a great deal of checking to see how consistent it was with existing naming
> convention.

Actually HAVE_STH_H is the convention used in autoconf documentation. It is Git convention of NO_STH_H (well, the single example of NO_LIBGEN_H) that is non-standard... but this convention predates [optional] autoconf support in Git.

> 
> Blacklisting OSes with a NO_PATHS_H #define feels like a mistake, as unknown
> OSes will fail rather than assuming a safe (if slightly untidy) default. I
> got caught out assuming that Windows was sane in this regard, for instance.

Well, there is only one example of checking for _headers_, namely NO_LIBGEN_H, so it is not that you are against some majority.

In short: if there is no voice against HAVE_PATHS_H, lets have it this way.

Show 6 quoted lines
> 
> To me, NEEDS_PATH_H hints that a system with paths.h would break if it
> weren't included, rather than that this is an extra feature available on
> this OS. But if NEEDS_* is used elsewhere to enable optional extras on
> systems which support them, I agree we should change to NEEDS_PATH_H to be
> consistent.

Well, things like NEEDS_LIBGEN or NEEDS_SSL_WITH_CRYPTO are about a few systems that needs *extra* work. I don't think NEEDS_PATH_H is a good variable name.

-- 
Jakub Narebski
Poland
Previous: Chris WebbNext: Chris Webb
Message 20 of 24 in “Replace hard-coded path with one configurable at make time”
  1. Replace hard-coded path with one configurable at make timeChris Webb, Apr 4, 2010
  2. Junio C HamanoApr 4, 2010
  3. Chris WebbApr 4, 2010
  4. Chris WebbApr 6, 2010
  5. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 6, 2010
  6. Erik Faye-LundApr 7, 2010
  7. Chris WebbApr 8, 2010
  8. Erik Faye-LundApr 8, 2010
  9. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 8, 2010
  10. Erik Faye-LundApr 8, 2010
  11. Chris WebbApr 9, 2010
  12. Chris WebbApr 13, 2010
  13. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 13, 2010
  14. Junio C HamanoApr 13, 2010
  15. Chris WebbApr 14, 2010
  16. Jakub NarebskiApr 15, 2010
  17. Junio C HamanoApr 15, 2010
  18. Jakub NarebskiApr 15, 2010
  19. Chris WebbApr 15, 2010
  20. Jakub NarebskiApr 15, 2010
  21. Chris WebbApr 15, 2010
  22. Replace hard-coded path with one from <paths.h>Chris Webb, Apr 15, 2010
  23. TaitApr 9, 2010
  24. git-instaweb: pass through invoking user's path to gitweb CGI scriptChris Webb, Apr 6, 2010

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.