Merge pull request #82638 from Repiteo/check_c_headers-to-dictionary

`check_c_headers` from tuple array to dictionary
This commit is contained in:
Rémi Verschelde 2023-10-03 17:26:16 +02:00
commit 090a5b028b
No known key found for this signature in database
GPG Key ID: C3336907360768E1
2 changed files with 5 additions and 4 deletions

View File

@ -988,9 +988,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":

View File

@ -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"}