Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:15631 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 42965 invoked by uid 1010); 27 Mar 2005 06:49:38 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 42950 invoked from network); 27 Mar 2005 06:49:38 -0000 Received: from unknown (HELO php.net) (127.0.0.1) by localhost with SMTP; 27 Mar 2005 06:49:38 -0000 X-Host-Fingerprint: 82.94.239.5 unknown Linux 2.5 (sometimes 2.4) (4) Received: from ([82.94.239.5:55424] helo=jdi.jdi-ict.nl) by pb1.pair.com (ecelerity HEAD r(5268)) with SMTP id 79/72-08304-08756424 for ; Sun, 27 Mar 2005 01:49:36 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j2R6nomJ019409 for ; Sun, 27 Mar 2005 08:49:50 +0200 Received: from localhost (localhost [127.0.0.1]) by jdi.jdi-ict.nl (8.12.11/8.12.11) with ESMTP id j2R6nlUm019398; Sun, 27 Mar 2005 08:49:47 +0200 Date: Sun, 27 Mar 2005 07:49:31 +0200 (CEST) X-X-Sender: derick@localhost To: Roman Neuhauser cc: internals@lists.php.net In-Reply-To: <20050326235844.GA6613@isis.sigpipe.cz> Message-ID: References: <20050326235844.GA6613@isis.sigpipe.cz> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jci-ict.nl Subject: Re: [PHP-DEV] snprintf / ap_php_snprintf, %lld, gcc versions? From: derick@php.net (Derick Rethans) On Sun, 27 Mar 2005, Roman Neuhauser wrote: > Hello, > > I'm having a puzzling problem with %lld conversion handling > in ap_php_snprintf, and it seems to be gcc version-dependent. > > I found this problem through Statgrab, which has this macro: > > #define PHP_SG_ADD_LLVAL(rtz, key, val) { \ > char tmp[256]; \ > int tmp_len = snprintf((char *)&tmp, sizeof(tmp) - 1, "%lld", val); \ > add_assoc_stringl_ex(rtz, key, sizeof(key), tmp, tmp_len, 1); \ > } > > main/snprintf.[hc]: > > #define snprintf ap_php_snprintf > PHPAPI int ap_php_snprintf(char *buf, size_t len, const char *format,...) For some reason the header file is not included then - that should be fixed as our own (ap_php_snprintf) function should always be used which is not gcc dependent. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org