aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorXi Ruoyao <xry111@mengyan1223.wang>2021-06-28 13:54:58 +0800
committerXi Ruoyao <xry111@mengyan1223.wang>2021-06-30 10:43:20 +0800
commit6bf383c37e6131a8e247e8a0997d55d65c830b6d (patch)
tree490acc40b9a3bddc68906ea347bff939b3798e3c /fixincludes/inclhack.def
parented392e9db434898eccec81edd85323d21d555fe9 (diff)
downloadgcc-6bf383c37e6131a8e247e8a0997d55d65c830b6d.zip
gcc-6bf383c37e6131a8e247e8a0997d55d65c830b6d.tar.gz
gcc-6bf383c37e6131a8e247e8a0997d55d65c830b6d.tar.bz2
fixinc: don't "fix" machine names in __has_include(...) [PR91085]
fixincludes/ PR other/91085 * fixfixes.c (check_has_inc): New static function. (machine_name_fix): Don't replace header names in __has_include(...). * inclhack.def (machine_name): Adjust test. * tests/base/testing.h: Update.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def3
1 files changed, 2 insertions, 1 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index 3a4cfe0..4db3117 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -3151,7 +3151,8 @@ fix = {
c_fix = machine_name;
test_text = "/* MACH_DIFF: */\n"
- "#if defined( i386 ) || defined( sparc ) || defined( vax )"
+ "#if defined( i386 ) || defined( sparc ) || defined( vax ) || "
+ "defined( linux ) || __has_include ( <linux.h> )"
"\n/* no uniform test, so be careful :-) */";
};