Improve #include structure of pem{,2}.h
authorNick Mathewson <nickm@torproject.org>
Tue, 23 Jan 2018 15:48:35 +0000 (10:48 -0500)
committerRichard Levitte <levitte@openssl.org>
Fri, 9 Feb 2018 16:49:07 +0000 (17:49 +0100)
  - pem2.h is empty, so pem.h doesn't need to include it.
  - pem2.h once declared ERR_load_PEM_strings(), so it should now
    include pemerr.h

Reviewed-by: Rich Salz <rsalz@openssl.org>
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5150)

include/openssl/pem.h
include/openssl/pem2.h

index 3b21ab8..55bcd71 100644 (file)
@@ -15,7 +15,6 @@
 # include <openssl/safestack.h>
 # include <openssl/evp.h>
 # include <openssl/x509.h>
-# include <openssl/pem2.h>
 # include <openssl/pemerr.h>
 
 #ifdef  __cplusplus
index 8a46324..bad7ac8 100644 (file)
@@ -7,10 +7,7 @@
  * https://www.openssl.org/source/license.html
  */
 
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#ifdef __cplusplus
-}
+#ifndef HEADER_PEM2_H
+# define HEADER_PEM2_H
+# include <openssl/pemerr.h>
 #endif