Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:14593 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 50989 invoked by uid 1010); 3 Feb 2005 20:14:31 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 50838 invoked from network); 3 Feb 2005 20:14:31 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 3 Feb 2005 20:14:31 -0000 X-Host-Fingerprint: 212.204.192.51 jdi.jdimedia.nl Linux 2.5 (sometimes 2.4) (4) Received: from ([212.204.192.51:48147] helo=jdi.jdimedia.nl) by pb1.pair.com (ecelerity HEAD (r4105:4106)) with SMTP id 9B/AC-10528-62682024 for ; Thu, 03 Feb 2005 15:14:30 -0500 Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id j13KEP4p005189 for ; Thu, 3 Feb 2005 21:14:25 +0100 Received: from jdi.jdimedia.nl ([127.0.0.1]) by localhost (jdi.jdimedia.nl [127.0.0.1]) (amavisd-new, port 10024) with LMTP id 02190-06-2 for ; Thu, 3 Feb 2005 21:14:25 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by jdi.jdimedia.nl (8.12.11/8.12.11) with ESMTP id j13KECWV005132; Thu, 3 Feb 2005 21:14:13 +0100 Date: Thu, 3 Feb 2005 21:14:13 +0100 (CET) X-X-Sender: derick@localhost To: Jeff Olhoeft cc: internals@lists.php.net In-Reply-To: <20050203195955.20828.qmail@lists.php.net> Message-ID: References: <20050203195955.20828.qmail@lists.php.net> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Virus-Scanned: by amavisd-new at jdimedia.nl Subject: Re: [PHP-DEV] snprintf defined as ap_php_snprintf From: derick@php.net (Derick Rethans) On Thu, 3 Feb 2005, Jeff Olhoeft wrote: > Hello, > > We recently upgraded a system from PHP 4.3.4 to 4.3.10, and tripped > over a problem with snprintf. One of our PHP extension modules > started failing, causing Apache to exit with code 0177. Investigation > showed the culprit to be snprintf. It turns out that in 4.3.10, > snprintf is #defined to be ap_php_snprintf. If we #undef snprintf > (thus using glibc's snprintf), the problem is cleared up. > > In this segment of the diff between versions 1.178.2.9 and 1.178.2.8 > of php.h, you'll see that tests for the existence of a system snprintf > were removed. > > -#if !defined(HAVE_SNPRINTF) || !defined(HAVE_VSNPRINTF) || > PHP_BROKEN_SPRINTF || PHP_BROKEN_SNPRINTF || PHP_BROKEN_VSNPRINTF > #include "snprintf.h" > -#endif > > Is this a deliberate change? Is there some way to tell configure to > use the system snprintf instead of the PHP version? You should always been using the ap_php_snprintf() one as that has an extra modified %F for non-locale aware number formatting. To make your extension work, make sure to include main/snprintf.h. regards, Derick -- Derick Rethans http://derickrethans.nl | http://ez.no | http://xdebug.org