From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1792) id 939B13858031; Tue, 8 Aug 2023 14:08:05 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org 939B13858031 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1691503685; bh=PQMF6PIUd/iAXTN4QbxozUdyzd1LwXSm50enWm9BYIE=; h=From:To:Subject:Date:From; b=F77dmaDr9blh0j3rbWqoNfrJmDFB08Z3+zEZ79Yba/X0kkz07DvoFrUZnUBMK8W2K BSOAUvfxUJieK+UgDKeAqckTBUIhOHJUT0RqdMeLuQ/5xg90lpAFgRiLGHdF1FCC2N pvCpRNiqzLgIjBJ8WKbVHjM8yIX5g4yDEMZnO1tk= Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: Samuel Thibault To: glibc-cvs@sourceware.org Subject: [glibc] hurd: Make error_t an int in C++ X-Act-Checkin: glibc X-Git-Author: Samuel Thibault X-Git-Refname: refs/heads/master X-Git-Oldrev: 3fcfb76bab97e55e7491db5fc1f11655b0993865 X-Git-Newrev: e3ae80adbc626c4073a082e0205fdbb83033018a Message-Id: <20230808140805.939B13858031@sourceware.org> Date: Tue, 8 Aug 2023 14:08:05 +0000 (GMT) List-Id: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e3ae80adbc626c4073a082e0205fdbb83033018a commit e3ae80adbc626c4073a082e0205fdbb83033018a Author: Samuel Thibault 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