unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Re: master 888ff3755d4 1/3: New function internal--c-header-file-path
@ 2025-01-06 20:28 Eli Zaretskii
  2025-01-06 20:40 ` Andreas Schwab
  2025-01-06 21:44 ` Stefan Kangas
  0 siblings, 2 replies; 6+ messages in thread
From: Eli Zaretskii @ 2025-01-06 20:28 UTC (permalink / raw)
  To: Stefan Kangas; +Cc: emacs-devel

Stefan,

Thanks for adding this function.  However, the method it uses to find
the include directories is incorrect and unportable.  On most systems
it will produce the default "/usr/include", which is most probably
wrong.

The way to ask GCC to show the list of directories where it looks for
header files is like this:

   (call-process "gcc" nil BUFFER nil "-v" "-E" "-")

and then look in BUFFER for text that begins with "#include <...>
search starts here:" and ends with "End of search list."  What's
in-between is the list of include directories, one directory per line,
which GCC searches for header file, in the order it searches them.



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2025-01-07 12:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-06 20:28 master 888ff3755d4 1/3: New function internal--c-header-file-path Eli Zaretskii
2025-01-06 20:40 ` Andreas Schwab
2025-01-06 21:45   ` Stefan Kangas
2025-01-06 21:44 ` Stefan Kangas
2025-01-07  9:57   ` Björn Bidar
2025-01-07 12:09   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).