Re: [PHP4BETA] libzend/zend_operators.c not thread-safe?

From: Date: Thu, 02 Dec 1999 22:42:24 +0000
Subject: Re: [PHP4BETA] libzend/zend_operators.c not thread-safe?
References: 1  Groups: php.version4 
Request: Send a blank email to php-version4+get-7288@lists.php.net to get a copy of this message
On Thu, Dec 02, 1999 at 04:27:43PM +0100, Thies C. Arntzen wrote: > line 1284: > > errno=0; > local_lval = strtol(str, &end_ptr, 10); > if (errno!=ERANGE && end_ptr == str+length) { /* integer string */ > > ... > > errno=0; > local_dval = strtod(str, &end_ptr); > if (errno!=ERANGE && end_ptr == str+length) { /* floating point string */ > > > using errno here seems to be not thread safe to me - am i wrong? The Pthreads standard says that each thread must have its own errno number. This is often implemented as a simple function which returns a pointer to the current errno variable. Then, errno can be simply defined as #define errno (*__errno_location()) -- Regards, Sascha Schumann Consultant

« previous php.version4 (#7288) next »