Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCons: Change check_c_headers from tuple array to dictionary #82638

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -987,9 +987,10 @@ if selected_platform in platform_list:
# Check for the existence of headers
conf = Configure(env)
if "check_c_headers" in env:
for header in env["check_c_headers"]:
if conf.CheckCHeader(header[0]):
env.AppendUnique(CPPDEFINES=[header[1]])
headers = env["check_c_headers"]
for header in headers:
if conf.CheckCHeader(header):
env.AppendUnique(CPPDEFINES=[headers[header]])

elif selected_platform != "":
if selected_platform == "list":
Expand Down
2 changes: 1 addition & 1 deletion drivers/unix/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,4 @@ Import("env")

env.add_source_files(env.drivers_sources, "*.cpp")

env["check_c_headers"] = [["mntent.h", "HAVE_MNTENT"]]
env["check_c_headers"] = {"mntent.h": "HAVE_MNTENT"}
Loading