This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
VMS C++ strerror prototype differences in perl.h.
authorCraig A. Berry <craigberry@mac.com>
Thu, 24 May 2012 22:47:39 +0000 (17:47 -0500)
committerCraig A. Berry <craigberry@mac.com>
Thu, 24 May 2012 22:47:39 +0000 (17:47 -0500)
The funny extra arguments to strerror are only there on VMS
when compiling with C, not C++.

On VMS, DONT_DECLARE_STD is synonymous with defined(__cplusplus).

perl.h

diff --git a/perl.h b/perl.h
index 29d4fa1..548f471 100644 (file)
--- a/perl.h
+++ b/perl.h
@@ -1381,13 +1381,13 @@ EXTERN_C char *crypt(const char *, const char *);
 #endif
 
 #ifdef HAS_STRERROR
+#ifndef DONT_DECLARE_STD
 #       ifdef VMS
        char *strerror (int,...);
 #       else
-#ifndef DONT_DECLARE_STD
        char *strerror (int);
-#endif
 #       endif
+#endif
 #       ifndef Strerror
 #           define Strerror strerror
 #       endif