Return-Path: Delivered-To: apmail-httpd-dev-archive@www.apache.org Received: (qmail 7292 invoked from network); 28 Jul 2010 13:42:31 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 28 Jul 2010 13:42:31 -0000 Received: (qmail 94759 invoked by uid 500); 28 Jul 2010 13:42:30 -0000 Delivered-To: apmail-httpd-dev-archive@httpd.apache.org Received: (qmail 94329 invoked by uid 500); 28 Jul 2010 13:42:28 -0000 Mailing-List: contact dev-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@httpd.apache.org Received: (qmail 94321 invoked by uid 99); 28 Jul 2010 13:42:27 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 13:42:27 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rainer.jung@kippdata.de designates 195.227.30.149 as permitted sender) Received: from [195.227.30.149] (HELO mailserver.kippdata.de) (195.227.30.149) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 28 Jul 2010 13:42:20 +0000 Received: from [195.227.30.209] (notebook-rj [195.227.30.209]) by mailserver.kippdata.de (8.13.5/8.13.5) with ESMTP id o6SDfsM5019934 for ; Wed, 28 Jul 2010 15:41:58 +0200 (CEST) Message-ID: <4C50339D.1090503@kippdata.de> Date: Wed, 28 Jul 2010 15:41:49 +0200 From: Rainer Jung User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.9.2.7) Gecko/20100713 Thunderbird/3.1.1 MIME-Version: 1.0 To: dev@httpd.apache.org Subject: Re: Error log format configuration syntax References: <201007212335.08993.sf@sfritsch.de> <4C476D3A.8080007@rowe-clan.net><201007272311.39590.sf@sfritsch.de> <4C4FE16C.3010702@scarlet.be> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-15; format=flowed Content-Transfer-Encoding: 7bit On 28.07.2010 13:44, Dan Poirier wrote: > On 2010-07-28 at 03:51, Alex Wulms wrote: > >> Hi, >> >> While adding some debug log statements to a module I'm working on, I ran >> into the problem that ap_log_error (in apache 2.2) does not support %zd >> or %zu conversion for type_t arguments. This was problematic to make the >> code compile on both 32 and 64 bit platforms. > >> * platform (32-bit or 64-bit). This violates the whole purpose of >> type_t, which >> * was introduced in C exactly to provide cross-platform compatibility... > > I'm confused. Neither c89 nor c99 define a type "type_t", as far as I > can see. > > But you might find the *_FMT macro definitions from APR helpful, or else > explain your problem in more detail? It seems in C99 a length specifier "z" means: For integer types, causes printf to expect a size_t sized integer argument. Citing: Specifies that a following d, i, o, u, x, or X conversion specifier applies to a size_t or the corresponding signed integer type argument; or that a following n conversion specifier applies to a pointer to a signed integer type corresponding to size_t argument. At least cross checking on Solaris 10 shows it is actually implemented for printf() there. So: type_t -> size_t and the OP should be able to use APR_SIZE_T_FMT or APR_SSIZE_T_FMT (signed) as you suggested. Regards, Rainer