From 5446c436d75018f607cedf8b223db5123578207c Mon Sep 17 00:00:00 2001 From: Graham Leggett Date: Wed, 17 Apr 2024 21:29:00 +0000 Subject: [PATCH] Add APR_OFF_MAX to give the maximum value of apr_off_t. Currently platforms with 32 bit and 64 bit values are supported. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1917077 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES | 3 +++ include/apr.h.in | 1 + include/apr.hnw | 1 + include/apr.hw | 1 + include/apr.hwc | 1 + 5 files changed, 7 insertions(+) diff --git a/CHANGES b/CHANGES index 4c44687931..767bbc24d9 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,9 @@ -*- coding: utf-8 -*- Changes for APR 2.0.0 + *) Add APR_OFF_MAX to give the maximum value of apr_off_t. [Graham + Leggett] + *) Pass details of module loading errors back to the caller through the apu_err_t structure. [Graham Leggett] diff --git a/include/apr.h.in b/include/apr.h.in index 75ad4f0810..afef5e45e4 100644 --- a/include/apr.h.in +++ b/include/apr.h.in @@ -463,6 +463,7 @@ typedef apr_int32_t apr_intptr_t; #endif #define APR_SIZE_MAX (~((apr_size_t)0)) +#define APR_OFF_MAX (sizeof(apr_off_t) == 4 ? APR_INT32_MAX : sizeof(apr_off_t) == 8 ? APR_INT64_MAX :0) /* Definitions that APR programs need to work properly. */ diff --git a/include/apr.hnw b/include/apr.hnw index 973808860a..12fe0b4591 100644 --- a/include/apr.hnw +++ b/include/apr.hnw @@ -340,6 +340,7 @@ typedef apr_int32_t apr_intptr_t; #endif #define APR_SIZE_MAX (~((apr_size_t)0)) +#define APR_OFF_MAX (sizeof(apr_off_t) == 4 ? APR_INT32_MAX : sizeof(apr_off_t) == 8 ? APR_INT64_MAX :0) /* PROC mutex is a GLOBAL mutex on Netware */ #define APR_PROC_MUTEX_IS_GLOBAL 1 diff --git a/include/apr.hw b/include/apr.hw index e296f4fd8d..9c06ed20a6 100644 --- a/include/apr.hw +++ b/include/apr.hw @@ -478,6 +478,7 @@ typedef apr_int32_t apr_intptr_t; #endif #define APR_SIZE_MAX (~((apr_size_t)0)) +#define APR_OFF_MAX (sizeof(apr_off_t) == 4 ? APR_INT32_MAX : sizeof(apr_off_t) == 8 ? APR_INT64_MAX :0) /* Definitions that APR programs need to work properly. */ diff --git a/include/apr.hwc b/include/apr.hwc index 3e3343c6ac..213fe2d19b 100644 --- a/include/apr.hwc +++ b/include/apr.hwc @@ -468,6 +468,7 @@ typedef apr_int32_t apr_intptr_t; #endif #define APR_SIZE_MAX (~((apr_size_t)0)) +#define APR_OFF_MAX (sizeof(apr_off_t) == 4 ? APR_INT32_MAX : sizeof(apr_off_t) == 8 ? APR_INT64_MAX :0) /* Definitions that APR programs need to work properly. */