]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Second try at dealing with ancient mktemp
authorStan Shebs <stanshebs@google.com>
Fri, 11 May 2018 19:54:53 +0000 (12:54 -0700)
committerStan Shebs <stanshebs@google.com>
Fri, 11 May 2018 19:54:53 +0000 (12:54 -0700)
scripts/check-installed-headers.sh

index e3c52eadf0551ad39b4f04d3eb2f7e77d052ea7e..f008ba3b21c1e086e9c167bd16142da186f485c1 100644 (file)
@@ -48,7 +48,7 @@ case "$1" in
        # GOOGLE ONLY: Through an unfortunate combination of circumstances,
        # the mktemp used here may be as old as 6.12 from 2008, which does
        # not like having an underscore instead of a dot.
-        cih_test_c=$(mktemp ${TMPDIR-/tmp}/cih_test.XXXXXX.c)
+        cih_test_c=$(mktemp ${TMPDIR-/tmp}/cih_test.XXXXXX)
         already="$skip_obsolete_type_check"
     ;;
     (c++)
@@ -103,7 +103,7 @@ for header in "$@"; do
 # error "is x32"
 #endif
 EOF
-                    if $cc_cmd -fsyntax-only "$cih_test_c" > /dev/null 2>&1
+                    if $cc_cmd -xc -fsyntax-only "$cih_test_c" > /dev/null 2>&1
                     then
                         is_x32=no
                     else
@@ -125,7 +125,7 @@ EOF
 #error "is x86-64"
 #endif
 EOF
-                    if $cc_cmd -fsyntax-only "$cih_test_c" > /dev/null 2>&1
+                    if $cc_cmd -xc -fsyntax-only "$cih_test_c" > /dev/null 2>&1
                     then
                         is_x86_64=no
                     else
@@ -157,9 +157,9 @@ $expanded_lib_mode
 #include <$header>
 int avoid_empty_translation_unit;
 EOF
-            if $cc_cmd -fsyntax-only $lang_mode "$cih_test_c" 2>&1
+            if $cc_cmd -xc -fsyntax-only $lang_mode "$cih_test_c" 2>&1
             then
-                includes=$($cc_cmd -fsyntax-only -H $lang_mode \
+                includes=$($cc_cmd -xc -fsyntax-only -H $lang_mode \
                               "$cih_test_c" 2>&1 | sed -ne 's/^[.][.]* //p')
                 for h in $includes; do
                     # Don't repeat work.