diff options
author | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-13 11:16:08 -0500 |
---|---|---|
committer | Viktor Dukhovni <openssl-users@dukhovni.org> | 2016-01-13 12:37:34 -0500 |
commit | dbc8541b86aee7b6e13e2208545fe625fc13cd7b (patch) | |
tree | 66363a79fd288ed13d187924e311e54514d8a7f9 /include | |
parent | aa1477926769dcdf839f8fccd9db79847899aa86 (diff) | |
download | openssl-dbc8541b86aee7b6e13e2208545fe625fc13cd7b.tar.gz |
For stroimax need C99 inttypes.h
Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/e_os2.h | 24 | ||||
-rw-r--r-- | include/openssl/ossl_typ.h | 2 |
2 files changed, 9 insertions, 17 deletions
diff --git a/include/openssl/e_os2.h b/include/openssl/e_os2.h index 3e7f16cbcf..fb022b13bd 100644 --- a/include/openssl/e_os2.h +++ b/include/openssl/e_os2.h @@ -53,11 +53,11 @@ * */ -#include <openssl/opensslconf.h> - #ifndef HEADER_E_OS2_H # define HEADER_E_OS2_H +# include <openssl/opensslconf.h> + #ifdef __cplusplus extern "C" { #endif @@ -285,7 +285,9 @@ extern "C" { # endif /* Standard integer types */ -# if defined(__osf__) || defined(__sgi) || defined(__hpux) || defined(OPENSSL_SYS_VMS) +# if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L || \ + defined(__osf__) || defined(__sgi) || defined(__hpux) || \ + defined(OPENSSL_SYS_VMS) # include <inttypes.h> # elif defined(OPENSSL_SYS_UEFI) typedef INT8 int8_t; @@ -314,21 +316,11 @@ typedef unsigned __int64 uint64_t; # endif /* - * We need a format operator for some client tools for uint64_t. - * This is an attempt at doing so in a portable manner. - * If we can't use a built-in definition, we'll revert to the previous - * behavior that was hard-coded but now causing compiler warnings on - * some systems (e.g. Mac OS X). + * We need a format operator for some client tools for uint64_t. If inttypes.h + * isn't available or did not define it, just go with hard-coded. */ # ifndef PRIu64 -# ifdef __STDC_VERSION__ -# if (__STDC_VERSION__ >= 199901L) -# include <inttypes.h> -# endif -# endif -# ifndef PRIu64 -# define PRIu64 "lu" -# endif +# define PRIu64 "lu" # endif /* ossl_inline: portable inline definition usable in public headers */ diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h index f754136bfe..059d386525 100644 --- a/include/openssl/ossl_typ.h +++ b/include/openssl/ossl_typ.h @@ -201,7 +201,7 @@ typedef struct ocsp_req_ctx_st OCSP_REQ_CTX; typedef struct ocsp_response_st OCSP_RESPONSE; typedef struct ocsp_responder_id_st OCSP_RESPID; -#if defined(INTMAX_MAX) && defined(UINTMAX_MAX) +#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L typedef intmax_t ossl_intmax_t; typedef uintmax_t ossl_uintmax_t; #else |