public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
* [glibc/maskray/grte] Second try at dealing with ancient mktemp
@ 2021-08-27 23:25 Fangrui Song
  0 siblings, 0 replies; only message in thread
From: Fangrui Song @ 2021-08-27 23:25 UTC (permalink / raw)
  To: glibc-cvs

https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2f608557116d2dd9bed835ed3a395f4c9fc4e86f

commit 2f608557116d2dd9bed835ed3a395f4c9fc4e86f
Author: Stan Shebs <stanshebs@google.com>
Date:   Fri May 11 12:54:53 2018 -0700

    Second try at dealing with ancient mktemp

Diff:
---
 scripts/check-installed-headers.sh | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh
index e3c52eadf0..f008ba3b21 100644
--- a/scripts/check-installed-headers.sh
+++ b/scripts/check-installed-headers.sh
@@ -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.


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-08-27 23:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-27 23:25 [glibc/maskray/grte] Second try at dealing with ancient mktemp Fangrui Song

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).