From: Toon Claes <toon@iotcl.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: git@vger.kernel.org, Patrick Steinhardt <ps@pks.im>
Subject: Re: [PATCH] meson: ensure correct version-def.h is used
Date: Mon, 13 Jan 2025 18:24:04 +0100 [thread overview]
Message-ID: <87bjwak4p7.fsf@iotcl.com> (raw)
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
next prev parent reply other threads:[~2025-01-13 17:24 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 10:28 [PATCH] meson: ensure correct version-def.h is used Toon Claes
2025-01-13 10:50 ` Patrick Steinhardt
2025-01-13 17:01 ` Junio C Hamano
2025-01-13 17:24 ` Toon Claes [this message]
2025-01-14 6:52 ` Patrick Steinhardt
2025-01-14 11:15 ` [PATCH v2] " Toon Claes
2025-01-16 9:43 ` Patrick Steinhardt
2025-01-16 15:57 ` Junio C Hamano
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bjwak4p7.fsf@iotcl.com \
--to=toon@iotcl.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=ps@pks.im \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).