From: Richard Levitte Date: Sat, 19 Nov 2022 12:05:19 +0000 (+0100) Subject: test/timing_load_creds.c: use OPENSSL_SYS_ macros X-Git-Tag: openssl-3.2.0-alpha1~1696 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=83c1220ad137bb4b651478444c3666c66ec9d640;p=thirdparty%2Fopenssl.git test/timing_load_creds.c: use OPENSSL_SYS_ macros A previous change was only half done. To avoid such mistakes again, we switch to using the OPENSSL_SYS_ macros, as the are clearer than having to check a pile of very platform and compiler specific macros. Reviewed-by: Matt Caswell Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/19720) --- diff --git a/test/timing_load_creds.c b/test/timing_load_creds.c index b5b53737287..a293f3ece29 100644 --- a/test/timing_load_creds.c +++ b/test/timing_load_creds.c @@ -10,16 +10,16 @@ #include #include -#if !defined(_WIN32) && !defined(__VMS) +#include + +#ifdef OPENSSL_SYS_UNIX # include +# include # include # include # include # include -# include <../include/internal/e_os.h> -# if defined(OPENSSL_SYS_UNIX) -# include -# endif +# include "internal/e_os.h" static char *prog; @@ -80,7 +80,7 @@ static void usage(void) int main(int ac, char **av) { -#ifndef _WIN32 +#ifdef OPENSSL_SYS_UNIX int i, debug = 0, count = 100, what = 'c'; struct stat sb; FILE *fp; @@ -192,9 +192,9 @@ int main(int ac, char **av) OPENSSL_free(contents); return EXIT_SUCCESS; #else -# if defined(_WIN32) +# if defined(OPENSSL_SYS_WINDOWS) fprintf(stderr, "This tool is not supported on Windows\n"); -# elif defined(__VMS) +# elif defined(OPENSSL_SYS_VMS) fprintf(stderr, "This tool is not supported on VMS\n"); # else fprintf(stderr, "This tool is not supported on this platform\n");