public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: David Edelsohn <dje@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r11-8707] fixincludes: AIX socket.h. Date: Thu, 8 Jul 2021 19:50:35 +0000 (GMT) [thread overview] Message-ID: <20210708195035.813EF3857025@sourceware.org> (raw) https://gcc.gnu.org/g:9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa commit r11-8707-g9f4e879cbcd8ff4bffcfb119c821bd4f1b7392fa Author: Clément Chigot <clement.chigot@atos.net> Date: Mon Jul 5 11:19:44 2021 -0400 fixincludes: AIX socket.h. Add more context to aix_externcpp1 selection to ensure that the fix is correctly applied even in future AIX versions. fixincludes/Changelog: 2021-07-01 Clément Chigot <clement.chigot@atos.net> * inclhack.def (aix_externcpp1): Improve select regexp. * fixincl.x: Regenerate. * tests/base/sys/socket.h: Update. (cherry picked from commit 03b634c8e0d3e8628ced79fc4f40873e12a3039c) Diff: --- fixincludes/fixincl.x | 10 ++++++---- fixincludes/inclhack.def | 9 ++++++--- fixincludes/tests/base/sys/socket.h | 1 + 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/fixincludes/fixincl.x b/fixincludes/fixincl.x index cc17edfba0b..6c50e972165 100644 --- a/fixincludes/fixincl.x +++ b/fixincludes/fixincl.x @@ -2,11 +2,11 @@ * * DO NOT EDIT THIS FILE (fixincl.x) * - * It has been AutoGen-ed December 9, 2020 at 11:16:08 AM by AutoGen 5.18.16 + * It has been AutoGen-ed July 1, 2021 at 03:44:46 PM by AutoGen 5.18.7 * From the definitions inclhack.def * and the template file fixincl */ -/* DO NOT SVN-MERGE THIS FILE, EITHER Wed Dec 9 11:16:08 EST 2020 +/* DO NOT SVN-MERGE THIS FILE, EITHER Thu Jul 1 15:44:46 CEST 2021 * * You must regenerate it. Use the ./genfixes script. * @@ -827,7 +827,8 @@ tSCC* apzAix_Externcpp1Machs[] = { */ tSCC zAix_Externcpp1Select0[] = "#ifndef _KERNEL\n\ -#ifdef __cplusplus"; +#ifdef __cplusplus\n\ +extern \"C\" int naccept\\(int, struct sockaddr \\*, socklen_t \\*\\);"; #define AIX_EXTERNCPP1_TEST_CT 1 static tTestDesc aAix_Externcpp1Tests[] = { @@ -840,7 +841,8 @@ static const char* apzAix_Externcpp1Patch[] = { "format", "#ifndef _KERNEL\n\ #ifdef __cplusplus\n\ -extern \"C++\" {", +extern \"C++\" {\n\ +extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);", (char*)NULL }; /* * * * * * * * * * * * * * * * * * * * * * * * * * diff --git a/fixincludes/inclhack.def b/fixincludes/inclhack.def index 3a4cfe06542..066bef99162 100644 --- a/fixincludes/inclhack.def +++ b/fixincludes/inclhack.def @@ -554,13 +554,16 @@ fix = { mach = "*-*-aix*"; files = "sys/socket.h"; select = "#ifndef _KERNEL\n" - "#ifdef __cplusplus"; + "#ifdef __cplusplus\n" + "extern \"C\" int naccept\\(int, struct sockaddr \\*, socklen_t \\*\\);"; c_fix = format; c_fix_arg = "#ifndef _KERNEL\n" "#ifdef __cplusplus\n" - "extern \"C++\" {"; + "extern \"C++\" {\n" + "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);"; test_text = "#ifndef _KERNEL\n" - "#ifdef __cplusplus"; + "#ifdef __cplusplus\n" + "extern \"C\" int naccept(int, struct sockaddr *, socklen_t *);"; }; fix = { diff --git a/fixincludes/tests/base/sys/socket.h b/fixincludes/tests/base/sys/socket.h index c1e2b425be1..588a378fe0a 100644 --- a/fixincludes/tests/base/sys/socket.h +++ b/fixincludes/tests/base/sys/socket.h @@ -13,6 +13,7 @@ #ifndef _KERNEL #ifdef __cplusplus extern "C++" { +extern "C" int naccept(int, struct sockaddr *, socklen_t *); #endif /* AIX_EXTERNCPP1_CHECK */
reply other threads:[~2021-07-08 19:50 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20210708195035.813EF3857025@sourceware.org \ --to=dje@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
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).