aboutsummaryrefslogtreecommitdiff
path: root/fixincludes/inclhack.def
diff options
context:
space:
mode:
authorDavid Edelsohn <dje.gcc@gmail.com>2020-09-16 18:56:00 +0000
committerDavid Edelsohn <dje.gcc@gmail.com>2020-09-17 14:18:32 +0000
commit21fdebc519578aad72c8550b05c05813c5b28c21 (patch)
tree83333f5e15a717362e6226aa6a1d1a0f0b6f190d /fixincludes/inclhack.def
parentb28b621ac67beee81a47adb50b954bcf751570fd (diff)
downloadgcc-21fdebc519578aad72c8550b05c05813c5b28c21.zip
gcc-21fdebc519578aad72c8550b05c05813c5b28c21.tar.gz
gcc-21fdebc519578aad72c8550b05c05813c5b28c21.tar.bz2
aix: apply socket.h extern "C++" more narrowly.
Recent Technology Levels of AIX 7.2 have made sys/socket.h more C++-aware, which causes the fix to be applied in too many locations. This patch adds more context for the selection to apply the fix more narrowly. fixincludes/ChangeLog: 2020-09-17 David Edelsohn <dje.gcc@gmail.com> * inclhack.def (aix_externcpp1): Add more context to select. (aix_externcpp2): Same. * fixincl.x: Regenerate. * tests/base/sys/socket.h: Update expected results.
Diffstat (limited to 'fixincludes/inclhack.def')
-rw-r--r--fixincludes/inclhack.def20
1 files changed, 12 insertions, 8 deletions
diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def
index f58e777..3b39742 100644
--- a/fixincludes/inclhack.def
+++ b/fixincludes/inclhack.def
@@ -553,24 +553,28 @@ fix = {
hackname = aix_externcpp1;
mach = "*-*-aix*";
files = "sys/socket.h";
- select = "#ifdef __cplusplus";
+ select = "#ifndef _KERNEL\n"
+ "#ifdef __cplusplus";
c_fix = format;
- c_fix_arg = "#ifdef __cplusplus\n"
+ c_fix_arg = "#ifndef _KERNEL\n"
+ "#ifdef __cplusplus\n"
"extern \"C++\" {";
- test_text = "#ifdef __cplusplus";
-
+ test_text = "#ifndef _KERNEL\n"
+ "#ifdef __cplusplus";
};
fix = {
hackname = aix_externcpp2;
mach = "*-*-aix*";
files = "sys/socket.h";
- select = "#else /\\* __cplusplus \\*/";
+ select = "#endif /\\* COMPAT_43 \\*/\n"
+ "#else /\\* __cplusplus \\*/";
c_fix = format;
- c_fix_arg = "} /* extern \"C++\" */\n"
+ c_fix_arg = "#endif /* COMPAT_43 */\n"
+ "} /* extern \"C++\" */\n"
"#else /* __cplusplus */";
- test_text = "#else /* __cplusplus */";
-
+ test_text = "#endif /* COMPAT_43 */\n"
+ "#else /* __cplusplus */";
};
/*