From d86167ec7513265bbafaf5c13fa60bd7c23aa732 Mon Sep 17 00:00:00 2001 From: "Dr. Matthias St. Pierre" Date: Sat, 28 Sep 2019 00:46:00 +0200 Subject: Add legacy include guards to public header files For every public header file, the old include guard definition needs to be added in addition to the new one include/openssl/file.h: #ifndef OPENSSL_FILE_H # define OPENSSL_FILE_H # pragma once # include # if !OPENSSL_API_3 # define HEADER_FILE_H # endif ... This is going to ensure that applications which use the old include guards externally, for example like this #ifndef HEADER_FILE_H # include #endif will not fail to compile. In addition to the legacy guard, the public header files also receive a '# pragma once' directive. Reviewed-by: Richard Levitte (Merged from https://github.com/openssl/openssl/pull/9333) --- include/openssl/hmac.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'include/openssl/hmac.h') diff --git a/include/openssl/hmac.h b/include/openssl/hmac.h index 93e6a86..8214853 100644 --- a/include/openssl/hmac.h +++ b/include/openssl/hmac.h @@ -9,6 +9,12 @@ #ifndef OPENSSL_HMAC_H # define OPENSSL_HMAC_H +# pragma once + +# include +# if !OPENSSL_API_3 +# define HEADER_HMAC_H +# endif # include -- cgit v1.1