diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/openssl/ossl_typ.h | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/include/openssl/ossl_typ.h b/include/openssl/ossl_typ.h index ed7c2a853c..f754136bfe 100644 --- a/include/openssl/ossl_typ.h +++ b/include/openssl/ossl_typ.h @@ -55,6 +55,8 @@ #ifndef HEADER_OPENSSL_TYPES_H # define HEADER_OPENSSL_TYPES_H +#include <limits.h> + #ifdef __cplusplus extern "C" { #endif @@ -199,6 +201,20 @@ 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) +typedef intmax_t ossl_intmax_t; +typedef uintmax_t ossl_uintmax_t; +#else +/* + * Not long long, because the C-library can only be expected to provide + * strtoll(), strtoull() at the same time as intmax_t and strtoimax(), + * strtoumax(). Since we use these for parsing arguments, we need the + * conversion functions, not just the sizes. + */ +typedef long ossl_intmax_t; +typedef unsigned long ossl_uintmax_t; +#endif + #ifdef __cplusplus } #endif |