summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-02-24 14:56:26 +0100
committerRichard Levitte <levitte@openssl.org>2020-02-27 01:21:50 +0100
commit605a0c709f4d50497a1c49ee117a0ec4bb956d58 (patch)
treed4ac8a8dc583271da9dc932de0d613293e6b1905 /include
parent8d87aecfb2d15652fc4c2bb458b2379421305fca (diff)
VMS: mitigate for the C++ compiler that doesn't understand certain pragmas
This only affects __DECC_INCLUDE_EPILOGUE.H and __DECC_INCLUDE_PROLOGUE.H, which are used automatically by HP and VSI C/C++ compilers. Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Matthias St. Pierre <Matthias.St.Pierre@ncp-e.com> (Merged from https://github.com/openssl/openssl/pull/11159)
Diffstat (limited to 'include')
-rw-r--r--include/openssl/__DECC_INCLUDE_EPILOGUE.H10
-rw-r--r--include/openssl/__DECC_INCLUDE_PROLOGUE.H12
2 files changed, 17 insertions, 5 deletions
diff --git a/include/openssl/__DECC_INCLUDE_EPILOGUE.H b/include/openssl/__DECC_INCLUDE_EPILOGUE.H
index c350018ad1..88dafd4d0f 100644
--- a/include/openssl/__DECC_INCLUDE_EPILOGUE.H
+++ b/include/openssl/__DECC_INCLUDE_EPILOGUE.H
@@ -8,9 +8,15 @@
*/
/*
- * This file is only used by HP C on VMS, and is included automatically
+ * This file is only used by HP C/C++ on VMS, and is included automatically
* after each header file from this directory
*/
+/*
+ * The C++ compiler doesn't understand these pragmas, even though it
+ * understands the corresponding command line qualifier.
+ */
+#ifndef __cplusplus
/* restore state. Must correspond to the save in __decc_include_prologue.h */
-#pragma names restore
+# pragma names restore
+#endif
diff --git a/include/openssl/__DECC_INCLUDE_PROLOGUE.H b/include/openssl/__DECC_INCLUDE_PROLOGUE.H
index 9a9c777f93..2459684b50 100644
--- a/include/openssl/__DECC_INCLUDE_PROLOGUE.H
+++ b/include/openssl/__DECC_INCLUDE_PROLOGUE.H
@@ -8,13 +8,19 @@
*/
/*
- * This file is only used by HP C on VMS, and is included automatically
+ * This file is only used by HP C/C++ on VMS, and is included automatically
* after each header file from this directory
*/
+/*
+ * The C++ compiler doesn't understand these pragmas, even though it
+ * understands the corresponding command line qualifier.
+ */
+#ifndef __cplusplus
/* save state */
-#pragma names save
+# pragma names save
/* have the compiler shorten symbols larger than 31 chars to 23 chars
* followed by a 8 hex char CRC
*/
-#pragma names as_is,shortened
+# pragma names as_is,shortened
+#endif