Skip to content

Commit

Permalink
workaround for missing src/build/unix/makepchinput.py with gcc11/12 a…
Browse files Browse the repository at this point in the history
…nd clang
  • Loading branch information
wlav committed Nov 1, 2023
1 parent ab9033a commit daf4b5f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions cling/src/build/unix/makepchinput.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,14 @@ def getSTLIncludes():
allHeadersPartContent += getGuardedStlInclude(header)
allHeadersPartContent += "#endif\n#endif\n"

# Special case for limits.h in gcc11 and later
allHeadersPartContent += '#if defined(__linux__) && defined(__GNUC__)\n' +\
'#include <climits>\n' +\
'#ifndef _POSIX_SEM_VALUE_MAX\n' +\
'#if __has_include (<syslimits.h>)\n' +\
'#include <syslimits.h>\n' +\
'#endif\n#endif\n#endif\n'

allHeadersPartContent += "// STL headers\n"

for header in stlHeadersList:
Expand Down

0 comments on commit daf4b5f

Please sign in to comment.