[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 888ff3755d4 1/3: New function internal--c-header-file-path
From: |
Eli Zaretskii |
Subject: |
Re: master 888ff3755d4 1/3: New function internal--c-header-file-path |
Date: |
Mon, 06 Jan 2025 22:28:48 +0200 |
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.
- Re: master 888ff3755d4 1/3: New function internal--c-header-file-path,
Eli Zaretskii <=