diff options
-rw-r--r-- | Mac/Modules/macosmodule.c | 5 | ||||
-rw-r--r-- | Modules/main.c | 7 | ||||
-rw-r--r-- | Modules/mathmodule.c | 13 | ||||
-rw-r--r-- | Objects/object.c | 8 | ||||
-rw-r--r-- | Parser/acceler.c | 17 | ||||
-rw-r--r-- | Parser/myreadline.c | 7 | ||||
-rw-r--r-- | Python/modsupport.c | 4 | ||||
-rw-r--r-- | Python/mystrtoul.c | 2 | ||||
-rw-r--r-- | Python/pythonrun.c | 12 | ||||
-rw-r--r-- | Python/traceback.c | 5 |
10 files changed, 0 insertions, 80 deletions
diff --git a/Mac/Modules/macosmodule.c b/Mac/Modules/macosmodule.c index 6790418..3217f86 100644 --- a/Mac/Modules/macosmodule.c +++ b/Mac/Modules/macosmodule.c @@ -47,10 +47,6 @@ static PyObject *MacOS_Error; /* Exception MacOS.Error */ #define PATHNAMELEN 256 #endif -#ifdef MPW -#define bufferIsSmall -607 /*error returns from Post and Accept */ -#endif - /* ----------------------------------------------------- */ /* Declarations for objects of type Resource fork */ @@ -778,4 +774,3 @@ initMacOS(void) return; } - diff --git a/Modules/main.c b/Modules/main.c index 91818e0..68a82c7 100644 --- a/Modules/main.c +++ b/Modules/main.c @@ -327,7 +327,6 @@ Py_Main(int argc, char **argv) _setmode(fileno(stdin), O_BINARY); _setmode(fileno(stdout), O_BINARY); #endif -#ifndef MPW #ifdef HAVE_SETVBUF setvbuf(stdin, (char *)NULL, _IONBF, BUFSIZ); setvbuf(stdout, (char *)NULL, _IONBF, BUFSIZ); @@ -337,12 +336,6 @@ Py_Main(int argc, char **argv) setbuf(stdout, (char *)NULL); setbuf(stderr, (char *)NULL); #endif /* !HAVE_SETVBUF */ -#else /* MPW */ - /* On MPW (3.2) unbuffered seems to hang */ - setvbuf(stdin, (char *)NULL, _IOLBF, BUFSIZ); - setvbuf(stdout, (char *)NULL, _IOLBF, BUFSIZ); - setvbuf(stderr, (char *)NULL, _IOLBF, BUFSIZ); -#endif /* MPW */ } else if (Py_InteractiveFlag) { #ifdef MS_WINDOWS diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 5415253..48c981a 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -121,13 +121,8 @@ FUNC2(fmod, fmod, " x % y may differ.") FUNC2(hypot, hypot, "hypot(x,y)\n\nReturn the Euclidean distance, sqrt(x*x + y*y).") -#ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */ -FUNC2(pow, power, - "pow(x,y)\n\nReturn x**y (x to the power of y).") -#else FUNC2(pow, pow, "pow(x,y)\n\nReturn x**y (x to the power of y).") -#endif FUNC1(sin, sin, "sin(x)\n\nReturn the sine of x (measured in radians).") FUNC1(sinh, sinh, @@ -190,15 +185,7 @@ math_modf(PyObject *self, PyObject *args) if (! PyArg_ParseTuple(args, "d:modf", &x)) return NULL; errno = 0; -#ifdef MPW /* MPW C modf expects pointer to extended as second argument */ - { - extended e; - x = modf(x, &e); - y = e; - } -#else x = modf(x, &y); -#endif Py_SET_ERANGE_IF_OVERFLOW(x); if (errno && is_error(x)) return NULL; diff --git a/Objects/object.c b/Objects/object.c index d85f697..33e146a 100644 --- a/Objects/object.c +++ b/Objects/object.c @@ -908,15 +908,7 @@ _Py_HashDouble(double v) * of mapping keys will turn out weird. */ -#ifdef MPW /* MPW C modf expects pointer to extended as second argument */ -{ - extended e; - fractpart = modf(v, &e); - intpart = e; -} -#else fractpart = modf(v, &intpart); -#endif if (fractpart == 0.0) { /* This must return the same hash as an equal int or long. */ if (intpart > LONG_MAX || -intpart > LONG_MAX) { diff --git a/Parser/acceler.c b/Parser/acceler.c index 63919c5..5f470fa 100644 --- a/Parser/acceler.c +++ b/Parser/acceler.c @@ -89,27 +89,10 @@ fixstate(grammar *g, state *s) } for (ibit = 0; ibit < g->g_ll.ll_nlabels; ibit++) { if (testbit(d1->d_first, ibit)) { -#ifdef applec -#define MPW_881_BUG /* Undefine if bug below is fixed */ -#endif -#ifdef MPW_881_BUG - /* In 881 mode MPW 3.1 has a code - generation bug which seems to - set the upper bits; fix this by - explicitly masking them off */ - int temp; -#endif if (accel[ibit] != -1) printf("XXX ambiguity!\n"); -#ifdef MPW_881_BUG - temp = 0xFFFF & - (a->a_arrow | (1 << 7) | - ((type - NT_OFFSET) << 8)); - accel[ibit] = temp; -#else accel[ibit] = a->a_arrow | (1 << 7) | ((type - NT_OFFSET) << 8); -#endif } } } diff --git a/Parser/myreadline.c b/Parser/myreadline.c index fcc4667..fd2b4f4 100644 --- a/Parser/myreadline.c +++ b/Parser/myreadline.c @@ -123,13 +123,6 @@ PyOS_StdioReadline(FILE *sys_stdin, FILE *sys_stdout, char *prompt) *p = '\0'; break; } -#ifdef MPW - /* Hack for MPW C where the prompt comes right back in the input */ - /* XXX (Actually this would be rather nice on most systems...) */ - n = strlen(prompt); - if (strncmp(p, prompt, n) == 0) - memmove(p, p + n, strlen(p) - n + 1); -#endif n = strlen(p); while (n > 0 && p[n-1] != '\n') { size_t incr = n+2; diff --git a/Python/modsupport.c b/Python/modsupport.c index ec85511..f26d7b8 100644 --- a/Python/modsupport.c +++ b/Python/modsupport.c @@ -3,11 +3,7 @@ #include "Python.h" -#ifdef MPW /* MPW pushes 'extended' for float and double types with varargs */ -typedef extended va_double; -#else typedef double va_double; -#endif /* Package context -- the full module name for package imports */ char *_Py_PackageContext = NULL; diff --git a/Python/mystrtoul.c b/Python/mystrtoul.c index db98d2b..8e60c0c 100644 --- a/Python/mystrtoul.c +++ b/Python/mystrtoul.c @@ -100,7 +100,6 @@ PyOS_strtoul(register char *str, char **ptr, int base) } temp = result; result = result * base + c; -#ifndef MPW if(base == 10) { if(((long)(result - c) / base != (long)temp)) /* overflow */ ovf = 1; @@ -109,7 +108,6 @@ PyOS_strtoul(register char *str, char **ptr, int base) if ((result - c) / base != temp) /* overflow */ ovf = 1; } -#endif str++; } diff --git a/Python/pythonrun.c b/Python/pythonrun.c index ab6ed58..c09a3ff 100644 --- a/Python/pythonrun.c +++ b/Python/pythonrun.c @@ -1566,18 +1566,6 @@ initsigs(void) PyOS_InitInterrupts(); /* May imply initsignal() */ } -#ifdef MPW - -/* Check for file descriptor connected to interactive device. - Pretend that stdin is always interactive, other files never. */ - -int -isatty(int fd) -{ - return fd == fileno(stdin); -} - -#endif /* * The file descriptor fd is considered ``interactive'' if either diff --git a/Python/traceback.c b/Python/traceback.c index b8edf13..987013c 100644 --- a/Python/traceback.c +++ b/Python/traceback.c @@ -147,13 +147,8 @@ tb_displayline(PyObject *f, char *filename, int lineno, char *name) int i; if (filename == NULL || name == NULL) return -1; -#ifdef MPW - /* This is needed by MPW's File and Line commands */ -#define FMT " File \"%.500s\"; line %d # in %.500s\n" -#else /* This is needed by Emacs' compile command */ #define FMT " File \"%.500s\", line %d, in %.500s\n" -#endif xfp = fopen(filename, "r" PY_STDIOTEXTMODE); if (xfp == NULL) { /* Search tail of filename in sys.path before giving up */ |