Commit d94a1a70 authored by Viktor Dukhovni's avatar Viktor Dukhovni
Browse files

For stro[ui]max require both C99 and UINTMAX_MAX/INTMAX_MAX

parent 6b95a378
Loading
Loading
Loading
Loading
+2 −1
Original line number Original line Diff line number Diff line
@@ -385,7 +385,8 @@ int opt_format(const char *s, unsigned long flags, int *result);
int opt_int(const char *arg, int *result);
int opt_int(const char *arg, int *result);
int opt_ulong(const char *arg, unsigned long *result);
int opt_ulong(const char *arg, unsigned long *result);
int opt_long(const char *arg, long *result);
int opt_long(const char *arg, long *result);
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
int opt_imax(const char *arg, intmax_t *result);
int opt_imax(const char *arg, intmax_t *result);
int opt_umax(const char *arg, uintmax_t *result);
int opt_umax(const char *arg, uintmax_t *result);
#endif
#endif
+4 −2
Original line number Original line Diff line number Diff line
@@ -75,7 +75,8 @@ static const OPTIONS *unknown;
static const OPTIONS *opts;
static const OPTIONS *opts;
static char prog[40];
static char prog[40];


#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L
#if !defined(__STDC_VERSION__) || __STDC_VERSION__ < 199901L || \
    !defined(INTMAX_MAX) && !defined(UINTMAX_MAX)
#define opt_imax opt_long
#define opt_imax opt_long
#define opt_umax opt_ulong
#define opt_umax opt_ulong
#endif
#endif
@@ -397,7 +398,8 @@ int opt_long(const char *value, long *result)
    return 1;
    return 1;
}
}


#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
    defined(INTMAX_MAX) && defined(UINTMAX_MAX)


/* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */
/* Parse an intmax_t, put it into *result; return 0 on failure, else 1. */
int opt_imax(const char *value, intmax_t *result)
int opt_imax(const char *value, intmax_t *result)
+2 −2
Original line number Original line Diff line number Diff line
@@ -201,8 +201,8 @@ typedef struct ocsp_req_ctx_st OCSP_REQ_CTX;
typedef struct ocsp_response_st OCSP_RESPONSE;
typedef struct ocsp_response_st OCSP_RESPONSE;
typedef struct ocsp_responder_id_st OCSP_RESPID;
typedef struct ocsp_responder_id_st OCSP_RESPID;


#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) \
#if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L && \
    && !defined(OPENSSL_SYS_VMS)
    defined(INTMAX_MAX) && defined(UINTMAX_MAX)
typedef intmax_t ossl_intmax_t;
typedef intmax_t ossl_intmax_t;
typedef uintmax_t ossl_uintmax_t;
typedef uintmax_t ossl_uintmax_t;
#else
#else