Bug #55172 [Fbk->NoF]: Compile fails on sprintf.lo

From: Date: Sun, 20 Jun 2021 04:22:08 +0000
Subject: Bug #55172 [Fbk->NoF]: Compile fails on sprintf.lo
References: 1  Groups: php.bugs 
Request: Send a blank email to php-bugs+get-234525@lists.php.net to get a copy of this message
Edit report at https://bugs.php.net/bug.php?id=55172&edit=1

 ID:               55172
 Updated by:       php-bugs@lists.php.net
 Reported by:      josh at joshbutts dot com
 Summary:          Compile fails on sprintf.lo
-Status:           Feedback
+Status:           No Feedback
 Type:             Bug
 Package:          Compile Failure
 Operating System: MacOS 10.7
 PHP Version:      5.3.6
 Assigned To:      cmb
 Private report:   N

 New Comment:

No feedback was provided. The bug is being suspended because
we assume that you are no longer experiencing the problem.
If this is not the case and you are able to provide the
information that was requested earlier, please do so and
change the status of the bug back to "Re-Opened". Thank you.


Previous Comments:
------------------------------------------------------------------------
[2021-06-10 12:40:46] cmb@php.net

Is that still an issue with any of the actively supported PHP
versions[1]?

[1] <https://www.php.net/supported-versions.php>

------------------------------------------------------------------------
[2011-07-23 19:29:01] info at richard5 dot net

Found the same error. However when I used a Mac that had a clean install of OSX 
10.7 aka Lion and Xcode 4.1 I had no problem. 
This error only occurred on an machine that I upgraded to Lion.

------------------------------------------------------------------------
[2011-07-10 23:02:54] josh at joshbutts dot com

Wonder if this might be a problem with detecting the presence of strnlen().

Commenting this in main/sprintf.c fixes the problem:
#if !HAVE_STRNLEN
static size_t strnlen(const char *s, size_t maxlen) {
	char *r = memchr(s, '\0', maxlen);
	return r ? r-s : maxlen;
}
#endif

------------------------------------------------------------------------
[2011-07-10 21:16:13] josh at joshbutts dot com

Description:
------------
When downloading the source tarball for 5.3.6, a vanilla ./configure followed by a make fails. 


gcc info:
i686-apple-darwin11-llvm-gcc-4.2

Expected result:
----------------
No error

Actual result:
--------------
/Users/josh/php-5.3.6/main/spprintf.c:186: error: static declaration of ‘strnlen’ follows
non-static declaration
/usr/include/string.h:143: error: previous declaration of ‘strnlen’ was here
make: *** [main/spprintf.lo] Error 1


------------------------------------------------------------------------



--
Edit this bug report at https://bugs.php.net/bug.php?id=55172&edit=1


Thread (5 messages)

« previous php.bugs (#234525) next »