@@ -118,15 +118,6 @@ extern int lstat(const char *, struct stat *);
118118extern int symlink (const char * , const char * );
119119#endif
120120
121- #ifdef NeXT
122- /* NeXT's <unistd.h> and <utime.h> aren't worth much */
123- #undef HAVE_UNISTD_H
124- #undef HAVE_UTIME_H
125- #define HAVE_WAITPID
126- /* #undef HAVE_GETCWD */
127- #define UNION_WAIT /* This should really be checked for by autoconf */
128- #endif
129-
130121#ifndef HAVE_UNISTD_H
131122#if defined(PYCC_VACPP )
132123extern int mkdir (char * );
@@ -3323,11 +3314,7 @@ posix_waitpid(PyObject *self, PyObject *args)
33233314 if (!PyArg_ParseTuple (args , "ii:waitpid" , & pid , & options ))
33243315 return NULL ;
33253316 Py_BEGIN_ALLOW_THREADS
3326- #ifdef NeXT
3327- pid = wait4 (pid , & status , options , NULL );
3328- #else
33293317 pid = waitpid (pid , & status , options );
3330- #endif
33313318 Py_END_ALLOW_THREADS
33323319 if (pid == -1 )
33333320 return posix_error ();
@@ -3970,85 +3957,6 @@ posix_ftruncate(PyObject *self, PyObject *args)
39703957}
39713958#endif
39723959
3973- #ifdef NeXT
3974- #define HAVE_PUTENV
3975- /* Steve Spicklemire got this putenv from NeXTAnswers */
3976- static int
3977- putenv (char * newval )
3978- {
3979- extern char * * environ ;
3980-
3981- static int firstTime = 1 ;
3982- char * * ep ;
3983- char * cp ;
3984- int esiz ;
3985- char * np ;
3986-
3987- if (!(np = strchr (newval , '=' )))
3988- return 1 ;
3989- * np = '\0' ;
3990-
3991- /* look it up */
3992- for (ep = environ ; * ep ; ep ++ )
3993- {
3994- /* this should always be true... */
3995- if (cp = strchr (* ep , '=' ))
3996- {
3997- * cp = '\0' ;
3998- if (!strcmp (* ep , newval ))
3999- {
4000- /* got it! */
4001- * cp = '=' ;
4002- break ;
4003- }
4004- * cp = '=' ;
4005- }
4006- else
4007- {
4008- * np = '=' ;
4009- return 1 ;
4010- }
4011- }
4012-
4013- * np = '=' ;
4014- if (* ep )
4015- {
4016- /* the string was already there:
4017- just replace it with the new one */
4018- * ep = newval ;
4019- return 0 ;
4020- }
4021-
4022- /* expand environ by one */
4023- for (esiz = 2 , ep = environ ; * ep ; ep ++ )
4024- esiz ++ ;
4025- if (firstTime )
4026- {
4027- char * * epp ;
4028- char * * newenv ;
4029- if (!(newenv = malloc (esiz * sizeof (char * ))))
4030- return 1 ;
4031-
4032- for (ep = environ , epp = newenv ; * ep ;)
4033- * epp ++ = * ep ++ ;
4034- * epp ++ = newval ;
4035- * epp = (char * ) 0 ;
4036- environ = newenv ;
4037- }
4038- else
4039- {
4040- if (!(environ = realloc (environ , esiz * sizeof (char * ))))
4041- return 1 ;
4042- environ [esiz - 2 ] = newval ;
4043- environ [esiz - 1 ] = (char * ) 0 ;
4044- firstTime = 0 ;
4045- }
4046-
4047- return 0 ;
4048- }
4049- #endif /* NeXT */
4050-
4051-
40523960#ifdef HAVE_PUTENV
40533961static char posix_putenv__doc__ [] =
40543962"putenv(key, value) -> None\n\
0 commit comments