X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=libiberty%2Fxstrerror.c;h=2ea2200e9fcfc86d4a3bf6d4e656b37e963b7fc7;hb=5ce0ff9b5464a030ea956473add180db42dcd513;hp=01f3a7b961a5e3f4dd295e23afc6d9541ccebf7f;hpb=49b1fae4309ab5b9833f0af388483c2b6b4b3d50;p=binutils-gdb.git diff --git a/libiberty/xstrerror.c b/libiberty/xstrerror.c index 01f3a7b961a..2ea2200e9fc 100644 --- a/libiberty/xstrerror.c +++ b/libiberty/xstrerror.c @@ -19,15 +19,28 @@ will never return a @code{NULL} pointer. #include "libiberty.h" #ifdef VMS -#include -#if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES) +# include +# if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES) +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ extern char *strerror (int,...); -#define DONT_DECLARE_STRERROR -#endif -#endif /* VMS */ +# define DONT_DECLARE_STRERROR +# ifdef __cplusplus +} +# endif /* __cplusplus */ +# endif +#endif /* VMS */ + #ifndef DONT_DECLARE_STRERROR +# ifdef __cplusplus +extern "C" { +# endif /* __cplusplus */ extern char *strerror (int); +# ifdef __cplusplus +} +# endif /* __cplusplus */ #endif /* If strerror returns NULL, we'll format the number into a static buffer. */