Mirror of the gdb-patches mailing list
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@gnu.org>
To: gdb-patches@sourceware.org
Cc: Thomas Schwinge <thomas@codesourcery.com>
Subject: hurd: fix RPC stubs names
Date: Sun, 27 Aug 2017 18:37:00 -0000	[thread overview]
Message-ID: <20170827183749.2ecowdoexc4mmkjq@var.youpi.perso.aquilenet.fr> (raw)

Mach RPCs expect C names for RPC stubs, so we should make sure they are
defined with C names.

* gdb/gnu-nat.c (ILL_RPC): Enclose RPC stub definition in extern "C" { }

diff --git a/gdb/gnu-nat.c b/gdb/gnu-nat.c
index d5e3841e68..b39d3d0a90 100644
--- a/gdb/gnu-nat.c
+++ b/gdb/gnu-nat.c
@@ -1796,11 +1796,13 @@ do_mach_notify_dead_name (mach_port_t notify, mach_port_t dead_port)
 
 \f
 #define ILL_RPC(fun, ...) \
+  extern "C" { \
   extern kern_return_t fun (__VA_ARGS__); \
   kern_return_t fun (__VA_ARGS__) \
   { \
     warning (_("illegal rpc: %s"), #fun); \
     return 0; \
+  } \
   }
 
 ILL_RPC (do_mach_notify_no_senders,


             reply	other threads:[~2017-08-27 18:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-27 18:37 Samuel Thibault [this message]
2018-07-15 10:49 ` Samuel Thibault
2018-07-15 13:02   ` Thomas Schwinge

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=20170827183749.2ecowdoexc4mmkjq@var.youpi.perso.aquilenet.fr \
    --to=samuel.thibault@gnu.org \
    --cc=gdb-patches@sourceware.org \
    --cc=thomas@codesourcery.com \
    /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: link
Be 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