Mercurial > cpython-lru_cache-weakref
diff Python/errors.c @ 2376:c31eaed7798b legacy-trunk
rename macstrerror to PyMac_StrError; no EINTR test in CW
| author | Guido van Rossum <guido@python.org> |
|---|---|
| date | Sat, 18 Feb 1995 14:52:19 +0000 |
| parents | b40e10bda231 |
| children | d5978238e3ba |
line wrap: on
line diff
--- a/Python/errors.c Sat Feb 18 14:51:32 1995 +0000 +++ b/Python/errors.c Sat Feb 18 14:52:19 1995 +0000 @@ -60,17 +60,20 @@ #include <errno.h> -#ifndef NT +#ifdef __CFM68K__ +#pragma lib_export on +#endif + #ifdef macintosh -/* -** For the mac, there's a function macstrerror in macosmodule.c. We can't -** call it strerror(), though, since that is already defined (for Think C) -** in ANSI +/* Replace strerror with a Mac specific routine. + XXX PROBLEM: some positive errors have a meaning for MacOS, + but some library routines set Unix error numbers... */ #undef strerror -#define strerror macstrerror -#include "macdefs.h" /* For CW to find EINTR */ -#endif /* !macintosh */ +#define strerror PyMac_StrError +#endif /* macintosh */ + +#ifndef NT extern char *strerror PROTO((int)); #endif /* !NT */ @@ -175,8 +178,10 @@ { object *v; int i = errno; +#ifdef EINTR if (i == EINTR && sigcheck()) return NULL; +#endif v = mkvalue("(is)", i, strerror(i)); if (v != NULL) { err_setval(exc, v);
