summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2022-11-19 13:05:19 +0100
committerTomas Mraz <tomas@openssl.org>2022-11-24 19:20:15 +0100
commit80d89bde84320e85bad0ad46ef1e72dd997d6a82 (patch)
tree47e531a52fb41083f096643bc045c0f467fd6ccb
parent5e616482dc12a6c2ba56e4b8359b220921891461 (diff)
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 <matt@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/19720) (cherry picked from commit 83c1220ad137bb4b651478444c3666c66ec9d640)
-rw-r--r--test/timing_load_creds.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/test/timing_load_creds.c b/test/timing_load_creds.c
index b5b5373728..a293f3ece2 100644
--- a/test/timing_load_creds.c
+++ b/test/timing_load_creds.c
@@ -10,16 +10,16 @@
#include <stdio.h>
#include <stdlib.h>
-#if !defined(_WIN32) && !defined(__VMS)
+#include <openssl/e_os2.h>
+
+#ifdef OPENSSL_SYS_UNIX
# include <sys/stat.h>
+# include <sys/resource.h>
# include <openssl/pem.h>
# include <openssl/x509.h>
# include <openssl/err.h>
# include <openssl/bio.h>
-# include <../include/internal/e_os.h>
-# if defined(OPENSSL_SYS_UNIX)
-# include <sys/resource.h>
-# 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");