]> sourceware.org Git - glibc.git/commitdiff
hurd: Make error_t an int in C++
authorSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 8 Aug 2023 14:03:24 +0000 (16:03 +0200)
committerSamuel Thibault <samuel.thibault@ens-lyon.org>
Tue, 8 Aug 2023 14:07:57 +0000 (16:07 +0200)
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++.

sysdeps/mach/hurd/bits/types/error_t.h

index 380aa434d5ba0a5e508df6cd184cad8c36153132..4a7bd452c8fd142e9261b36ee5f693f607518e71 100644 (file)
 #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
This page took 0.045202 seconds and 5 git commands to generate.