From: Richard Levitte Date: Thu, 23 Feb 2017 12:45:00 +0000 (+0100) Subject: In apps/rehash.c, decorate the inclusion of internal/o_dir.h for VMS X-Git-Tag: OpenSSL_1_1_1-pre1~2301 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2ac915f16218982f48dbc799b8308a07441d2e35;hp=227a44b1f639ea02d1a278ed07fa5f2dc6d286c6;p=oweals%2Fopenssl.git In apps/rehash.c, decorate the inclusion of internal/o_dir.h for VMS The library files are built with symbol names as is, while the application is built with the default uppercase-all-symbols mode. That's fine for public APIs, because we have __DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H automatically telling the compiler how to treat the public header files. However, we don't have the same setup for internal library APIs, since they are usually only used by the libraries. Because apps/rehash.c uses a library internal header file, we have to surround that inclusion with the same kind of pragmas found in __DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H, or we get unresolved symbols when building no-shared. Reviewed-by: Rich Salz (Merged from https://github.com/openssl/openssl/pull/2725) --- diff --git a/apps/rehash.c b/apps/rehash.c index e837d27614..23dbfd8daa 100644 --- a/apps/rehash.c +++ b/apps/rehash.c @@ -25,7 +25,23 @@ # include # include +/* + * Make sure that the processing of symbol names is treated the same as when + * libcrypto is built. This is done automatically for public headers (see + * include/openssl/__DECC_INCLUDE_PROLOGUE.H and __DECC_INCLUDE_EPILOGUE.H), + * but not for internal headers. + */ +# ifdef __VMS +# pragma names save +# pragma names as_is,shortened +# endif + # include "internal/o_dir.h" + +# ifdef __VMS +# pragma names restore +# endif + # include # include # include