summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorShane Lontis <shane.lontis@oracle.com>2019-06-11 18:17:52 +1000
committerShane Lontis <shane.lontis@oracle.com>2019-06-11 21:27:55 +1000
commita1f0478277cedbbe5e866c046e540b48e8045a28 (patch)
tree24b400a834153cb9b3618b6f00b4c3cd8d5f5a78 /test
parent92bec78a26139185c840a5d516a2aa171b20e269 (diff)
Fix Windows Compile failure due to missing <inttypes.h>
Including <inttypes.h> caused a windows build failure. The test is now skipped if strtoimax & strtoumax are not supported. It does this by checking for a define which is only available if inttypes.h is not included. The include is done automagically inside e_os2.h. Reviewed-by: Richard Levitte <levitte@openssl.org> (Merged from https://github.com/openssl/openssl/pull/8986)
Diffstat (limited to 'test')
-rw-r--r--test/params_conversion_test.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/test/params_conversion_test.c b/test/params_conversion_test.c
index 96d0aaafed..9db5bd8b9b 100644
--- a/test/params_conversion_test.c
+++ b/test/params_conversion_test.c
@@ -9,13 +9,15 @@
*/
#include <string.h>
-#include <inttypes.h>
#include <openssl/params.h>
#include "testutil.h"
-#ifdef OPENSSL_SYS_WINDOWS
-# define strcasecmp _stricmp
-#endif
+/* On machines that dont support <inttypes.h> just disable the tests */
+#if !defined(OPENSSL_NO_INTTYPES_H)
+
+# ifdef OPENSSL_SYS_WINDOWS
+# define strcasecmp _stricmp
+# endif
typedef struct {
const OSSL_PARAM *param;
@@ -320,6 +322,8 @@ end:
return res;
}
+#endif /* OPENSSL_NO_INTTYPES_H */
+
OPT_TEST_DECLARE_USAGE("file...\n")
int setup_tests(void)
@@ -329,6 +333,9 @@ int setup_tests(void)
if (n == 0)
return 0;
+#if !defined(OPENSSL_NO_INTTYPES_H)
ADD_ALL_TESTS(run_param_file_tests, n);
+#endif /* OPENSSL_NO_INTTYPES_H */
+
return 1;
}