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

Re: [PATCH] meson: ensure correct version-def.h is used

From
Toon Claes <toon@iotcl.com>
Date
Jan 13, 2025, 17:24 UTC
Message-ID
<87bjwak4p7.fsf@iotcl.com>
In-Reply-To
<xmqqr056abry.fsf@gitster.g>
Junio C Hamano <gitster@pobox.com> writes:
> What happens if we use <version-def.h> to include (which is how C
> standard tells us to do), with an explicit include path specified
> with -I<directory>?  If it solves the issue, that may be a better
> approach.
I don't have a good source, but for example Wikipedia[1] says:
    Some preprocessors locate the include file differently based on the
    enclosing delimiters; treating a path in double-quotes as relative
    to the including file and a path in angle brackets as located in one
    of the directories of the configured system search path.

So behavior seems to depend on the implementation of the compiler. I'm not sure we can trust all architectures to do what we expect. Or, because I don't expect many people to use Make and Meson at the same time, do we not consider this an issue for most anyway?

[1]: https://en.wikipedia.org/wiki/Include_directive#C/C++

-- Toon

Previous: Junio C HamanoNext: Patrick Steinhardt
Message 4 of 8 in “meson: ensure correct version-def.h is used”
  1. meson: ensure correct version-def.h is usedToon Claes, Jan 13, 2025
  2. Patrick SteinhardtJan 13, 2025
  3. Junio C HamanoJan 13, 2025
  4. Toon ClaesJan 13, 2025
  5. Patrick SteinhardtJan 14, 2025
  6. meson: ensure correct version-def.h is usedToon Claes, Jan 14, 2025
  7. Patrick SteinhardtJan 16, 2025
  8. Junio C HamanoJan 16, 2025

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.