Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e9fbc09

Browse files
committed
rename macstrerror to PyMac_StrError; no EINTR test in CW
1 parent 8a1e8eb commit e9fbc09

1 file changed

Lines changed: 13 additions & 8 deletions

File tree

Python/errors.c

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -60,17 +60,20 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
6060

6161
#include <errno.h>
6262

63-
#ifndef NT
63+
#ifdef __CFM68K__
64+
#pragma lib_export on
65+
#endif
66+
6467
#ifdef macintosh
65-
/*
66-
** For the mac, there's a function macstrerror in macosmodule.c. We can't
67-
** call it strerror(), though, since that is already defined (for Think C)
68-
** in ANSI
68+
/* Replace strerror with a Mac specific routine.
69+
XXX PROBLEM: some positive errors have a meaning for MacOS,
70+
but some library routines set Unix error numbers...
6971
*/
7072
#undef strerror
71-
#define strerror macstrerror
72-
#include "macdefs.h" /* For CW to find EINTR */
73-
#endif /* !macintosh */
73+
#define strerror PyMac_StrError
74+
#endif /* macintosh */
75+
76+
#ifndef NT
7477
extern char *strerror PROTO((int));
7578
#endif /* !NT */
7679

@@ -175,8 +178,10 @@ err_errno(exc)
175178
{
176179
object *v;
177180
int i = errno;
181+
#ifdef EINTR
178182
if (i == EINTR && sigcheck())
179183
return NULL;
184+
#endif
180185
v = mkvalue("(is)", i, strerror(i));
181186
if (v != NULL) {
182187
err_setval(exc, v);

0 commit comments

Comments
 (0)