ID: 40693 Updated by: [EMAIL PROTECTED] Reported By: stefan dot teleman at gmail dot com -Status: Open +Status: Wont fix Bug Type: Strings related -Operating System: Solaris 10 +Operating System: * PHP Version: 5.2.1 New Comment:
Usually reimplementation of a c library function means that we rely on very specific functionality. Otfen in this cases many implementations are simply plain wrong. This is true for a bunch of stuff where werequire the C99 compliant implementation. Previous Comments: ------------------------------------------------------------------------ [2007-03-02 17:22:40] stefan dot teleman at gmail dot com Description: ------------ TSRM/tsrm_strtok_r.c reimplements strtok_r(3C) (php-5.2.0 and php-5.2.1). Please don't do this on Solaris. There is no reason to reimplement a Standard C Library function. diff -wu output included below. Reproduce code: --------------- --- tsrm_strtok_r.c.orig 2000-09-11 11:15:29.000000000 -0400 +++ tsrm_strtok_r.c 2007-03-02 03:25:44.953128000 -0500 @@ -16,6 +16,9 @@ char *tsrm_strtok_r(char *s, const char *delim, char **last) { +#if defined(SOLARIS) + return strtok_r(s, delim, last); +#else char *token; if (s == NULL) { @@ -41,6 +44,7 @@ *last = s + 1; } return token; +#endif } #if 0 ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=40693&edit=1