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++.
This commit is contained in:
Samuel Thibault 2023-08-08 16:03:24 +02:00
parent 3fcfb76bab
commit e3ae80adbc

View File

@ -24,6 +24,12 @@
#ifndef __error_t_defined #ifndef __error_t_defined
# define __error_t_defined 1 # 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; typedef enum __error_t_codes error_t;
#endif
#endif #endif