On 24 Sep 2002 at 12:31, Tim Peters wrote:
I would like to remind folks that on some platforms, one cannot just use "errno = 0". On those platforms calling a function is required to set errno.
Except that errno=0 works fine on any platform with a standard- conforming C implementation, and this isn't even a fuzzy POSIX issue -- it's a requirement of the C standard. We can define piles of macros instead, but I expect that, as the years drag on, people will "forget" to use them.
I don't argue the point that "this stinks".
What are our choices:
1. CE port will always be a distinct branch/other cvs, and require gobs of work by "CE porters" for every new core release, changing all the "errno" statements
2. CE changes will always be a pain in the butt for core developers forced to remember Py_SetErrno()
3. No CE port.
(oh, also put "NetWare" in there wherever you see the word CE .. and I suspect some other embedded operating systems running on MMU-less processors that can't virtualize errno and don't have TLS)
Surprisingly, there aren't that many modules that reference errno directly.
In fact, the math stuff is the worst offender .. ;-)
Brad Clements, firstname.lastname@example.org (315)268-1000 http://www.murkworks.com (315)268-9812 Fax AOL-IM: BKClements