]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Use gcc -finput-charset=ascii for check-installed-headers.
authorStefan Liebler <stli@linux.ibm.com>
Thu, 13 Feb 2020 16:32:00 +0000 (17:32 +0100)
committerStefan Liebler <stli@linux.ibm.com>
Thu, 13 Feb 2020 16:32:00 +0000 (17:32 +0100)
A non-ascii character in the installed headers leads now to:
error: failure to convert ascii to UTF-8

Such a finding in s390 specific fenv.h leads to fails in GCC testsuite.
See glibc commit 08aea89ef67c5780ae734073494df0a451bce20f.

Adding this gcc option also to our tests was proposed by Florian Weimer.

This change also found a hit in resource.h where now "microseconds" is used.
I've adjusted all the resource.h files.

I've used the following command to check for further hits in headers.
LC_ALL=C find -name "*.h" -exec grep -PHn "[\x80-\xFF]" {} \;

Tested on s390x and x86_64.

Reviewed-by: Zack Weinberg <zackw@panix.com>
scripts/check-installed-headers.sh
sysdeps/unix/sysv/linux/alpha/bits/resource.h
sysdeps/unix/sysv/linux/bits/resource.h
sysdeps/unix/sysv/linux/mips/bits/resource.h
sysdeps/unix/sysv/linux/sparc/bits/resource.h

index 0ed572ce0d7c9c47ddec803c6d064cdeaf0bd8c0..f70340f098ce2bcb5cc1ceef5e77a3bf4f616ac6 100644 (file)
@@ -123,7 +123,8 @@ $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 -finput-charset=ascii -fsyntax-only $lang_mode \
+                      "$cih_test_c" 2>&1
             then :
             else failed=1
             fi
index 7210bc7ea3dae0c68fdb0ab3c9bb09ae9ddbfde1..8b80906f274006aeb1467d01e8733c243101c4d9 100644 (file)
@@ -98,7 +98,7 @@ enum __rlimit_resource
   __RLIMIT_RTPRIO = 14,
 #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
 
-  /* Maximum CPU time in µs that a process scheduled under a real-time
+  /* Maximum CPU time in microseconds that a process scheduled under a real-time
      scheduling policy may consume without making a blocking system
      call before being forcibly descheduled.  */
   __RLIMIT_RTTIME = 15,
index 3cc3eedcc3511ddd16042208ccba18a9ea00143b..8745234ed9e98ad98e393df79df8a3433616e078 100644 (file)
@@ -98,7 +98,7 @@ enum __rlimit_resource
   __RLIMIT_RTPRIO = 14,
 #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
 
-  /* Maximum CPU time in µs that a process scheduled under a real-time
+  /* Maximum CPU time in microseconds that a process scheduled under a real-time
      scheduling policy may consume without making a blocking system
      call before being forcibly descheduled.  */
   __RLIMIT_RTTIME = 15,
index f423ff8fc24ac596aea75f496723b7a7989f560b..4600d08ade057e1b87ebae9425c783db1a30540c 100644 (file)
@@ -98,7 +98,7 @@ enum __rlimit_resource
   __RLIMIT_RTPRIO = 14,
 #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
 
-  /* Maximum CPU time in µs that a process scheduled under a real-time
+  /* Maximum CPU time in microseconds that a process scheduled under a real-time
      scheduling policy may consume without making a blocking system
      call before being forcibly descheduled.  */
   __RLIMIT_RTTIME = 15,
index 714f30fd73161f60e26202fa0bd8ca5cd74a1cc7..5d5762fab097832d2535a6dbb7b2ba31fdb63a70 100644 (file)
@@ -98,7 +98,7 @@ enum __rlimit_resource
   __RLIMIT_RTPRIO = 14,
 #define RLIMIT_RTPRIO __RLIMIT_RTPRIO
 
-  /* Maximum CPU time in µs that a process scheduled under a real-time
+  /* Maximum CPU time in microseconds that a process scheduled under a real-time
      scheduling policy may consume without making a blocking system
      call before being forcibly descheduled.  */
   __RLIMIT_RTTIME = 15,