Sync libiberty from GCC, replaying updates to configure scripts
[deliverable/binutils-gdb.git] / libiberty / xstrerror.c
index e3f1ca04a261bcb9d33db6e705a2084e8353f64b..2ea2200e9fcfc86d4a3bf6d4e656b37e963b7fc7 100644 (file)
@@ -19,15 +19,28 @@ will never return a @code{NULL} pointer.
 #include "libiberty.h"
 
 #ifdef VMS
-#include <errno.h>
-#if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
-extern char *strerror PARAMS ((int,...));
-#define DONT_DECLARE_STRERROR
-#endif
-#endif /* VMS */
+#  include <errno.h>
+#  if !defined (__STRICT_ANSI__) && !defined (__HIDE_FORBIDDEN_NAMES)
+#    ifdef __cplusplus
+extern "C" {
+#    endif /* __cplusplus */
+extern char *strerror (int,...);
+#    define DONT_DECLARE_STRERROR
+#    ifdef __cplusplus
+}
+#    endif /* __cplusplus */
+#  endif
+#endif  /* VMS */
+
 
 #ifndef DONT_DECLARE_STRERROR
-extern char *strerror PARAMS ((int));
+#  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.  */
@@ -38,15 +51,14 @@ static char xstrerror_buf[sizeof ERRSTR_FMT + 20];
 /* Like strerror, but result is never a null pointer.  */
 
 char *
-xstrerror (errnum)
-     int errnum;
+xstrerror (int errnum)
 {
   char *errstr;
 #ifdef VMS
-  char *(*vmslib_strerror) PARAMS ((int,...));
+  char *(*vmslib_strerror) (int,...);
 
   /* Override any possibly-conflicting declaration from system header.  */
-  vmslib_strerror = (char *(*) PARAMS ((int,...))) strerror;
+  vmslib_strerror = (char *(*) (int,...)) strerror;
   /* Second argument matters iff first is EVMSERR, but it's simpler to
      pass it unconditionally.  `vaxc$errno' is declared in <errno.h>
      and maintained by the run-time library in parallel to `errno'.
This page took 0.024067 seconds and 4 git commands to generate.