public inbox for glibc-cvs@sourceware.org
help / color / mirror / Atom feed
From: Samuel Thibault <sthibaul@sourceware.org>
To: glibc-cvs@sourceware.org
Subject: [glibc] hurd: Make error_t an int in C++
Date: Tue, 8 Aug 2023 14:08:05 +0000 (GMT) [thread overview]
Message-ID: <20230808140805.939B13858031@sourceware.org> (raw)
https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e3ae80adbc626c4073a082e0205fdbb83033018a
commit e3ae80adbc626c4073a082e0205fdbb83033018a
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Tue Aug 8 16:03:24 2023 +0200
hurd: Make error_t an int in C++
Making error_t defined to enum __error_t_codes conveniently makes the
debugger print symbolic values, but in C++ int is not interoperable with
enum __error_t_codes, leading to C++ application build issues, so let's
revert error_t to int in C++.
Diff:
---
sysdeps/mach/hurd/bits/types/error_t.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/sysdeps/mach/hurd/bits/types/error_t.h b/sysdeps/mach/hurd/bits/types/error_t.h
index 380aa434d5..4a7bd452c8 100644
--- a/sysdeps/mach/hurd/bits/types/error_t.h
+++ b/sysdeps/mach/hurd/bits/types/error_t.h
@@ -24,6 +24,12 @@
#ifndef __error_t_defined
# define __error_t_defined 1
+#ifdef __cplusplus
+/* Unfortunately, in C++ int and enum __error_t_codes are not
+ interoperable... */
+typedef int error_t;
+#else
typedef enum __error_t_codes error_t;
+#endif
#endif
reply other threads:[~2023-08-08 14:08 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=20230808140805.939B13858031@sourceware.org \
--to=sthibaul@sourceware.org \
--cc=glibc-cvs@sourceware.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: 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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).