From: stefan dot teleman at gmail dot com Operating system: Solaris 10 PHP version: 5.2.1 PHP Bug Type: Strings related Bug description: reimplementation of strtok_r in TSRM/tsrm_strtok_r.c
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 bug report at http://bugs.php.net/?id=40693&edit=1 -- Try a CVS snapshot (PHP 4.4): http://bugs.php.net/fix.php?id=40693&r=trysnapshot44 Try a CVS snapshot (PHP 5.2): http://bugs.php.net/fix.php?id=40693&r=trysnapshot52 Try a CVS snapshot (PHP 6.0): http://bugs.php.net/fix.php?id=40693&r=trysnapshot60 Fixed in CVS: http://bugs.php.net/fix.php?id=40693&r=fixedcvs Fixed in release: http://bugs.php.net/fix.php?id=40693&r=alreadyfixed Need backtrace: http://bugs.php.net/fix.php?id=40693&r=needtrace Need Reproduce Script: http://bugs.php.net/fix.php?id=40693&r=needscript Try newer version: http://bugs.php.net/fix.php?id=40693&r=oldversion Not developer issue: http://bugs.php.net/fix.php?id=40693&r=support Expected behavior: http://bugs.php.net/fix.php?id=40693&r=notwrong Not enough info: http://bugs.php.net/fix.php?id=40693&r=notenoughinfo Submitted twice: http://bugs.php.net/fix.php?id=40693&r=submittedtwice register_globals: http://bugs.php.net/fix.php?id=40693&r=globals PHP 3 support discontinued: http://bugs.php.net/fix.php?id=40693&r=php3 Daylight Savings: http://bugs.php.net/fix.php?id=40693&r=dst IIS Stability: http://bugs.php.net/fix.php?id=40693&r=isapi Install GNU Sed: http://bugs.php.net/fix.php?id=40693&r=gnused Floating point limitations: http://bugs.php.net/fix.php?id=40693&r=float No Zend Extensions: http://bugs.php.net/fix.php?id=40693&r=nozend MySQL Configuration Error: http://bugs.php.net/fix.php?id=40693&r=mysqlcfg