[Python-checkins] CVS: python/dist/src/Modules fpectlmodule.c,2.15,2.16 grpmodule.c,2.15,2.16 posixmodule.c,2.220,2.221 pwdmodule.c,1.25,1.26
Jack Jansen
jackjansen@users.sourceforge.net
Fri, 01 Feb 2002 07:46:31 -0800
Update of /cvsroot/python/python/dist/src/Modules
In directory usw-pr-cvs1:/tmp/cvs-serv29045/Modules
Modified Files:
fpectlmodule.c grpmodule.c posixmodule.c pwdmodule.c
Log Message:
Got rid of a few more NeXT ifdefs. The last, I think.
Index: fpectlmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/fpectlmodule.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** fpectlmodule.c 2002/01/17 23:15:58 2.15
--- fpectlmodule.c 2002/02/01 15:46:29 2.16
***************
*** 212,221 ****
PyOS_setsig(SIGFPE, handler);
- /*-- NeXT -----------------------------------------------------------------*/
- #elif defined(NeXT) && defined(m68k) && defined(__GNUC__)
- /* NeXT needs explicit csr set to generate SIGFPE */
- asm("fmovel #0x1400,fpcr"); /* set OVFL and ZD bits */
- PyOS_setsig(SIGFPE, handler);
-
/*-- Microsoft Windows, NT ------------------------------------------------*/
#elif defined(_MSC_VER)
--- 212,215 ----
Index: grpmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/grpmodule.c,v
retrieving revision 2.15
retrieving revision 2.16
diff -C2 -d -r2.15 -r2.16
*** grpmodule.c 2001/03/11 03:03:07 2.15
--- grpmodule.c 2002/02/01 15:46:29 2.16
***************
*** 28,38 ****
p->gr_name,
p->gr_passwd,
- #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__)
- /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3;
- for later versions you may have to remove this */
- (long)p->gr_short_pad, /* ugh-NeXT broke the padding */
- #else
(long)p->gr_gid,
- #endif
w);
Py_DECREF(w);
--- 28,32 ----
Index: posixmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/posixmodule.c,v
retrieving revision 2.220
retrieving revision 2.221
diff -C2 -d -r2.220 -r2.221
*** posixmodule.c 2002/02/01 11:27:43 2.220
--- posixmodule.c 2002/02/01 15:46:29 2.221
***************
*** 119,131 ****
#endif
- #ifdef NeXT
- /* NeXT's <unistd.h> and <utime.h> aren't worth much */
- #undef HAVE_UNISTD_H
- #undef HAVE_UTIME_H
- #define HAVE_WAITPID
- /* #undef HAVE_GETCWD */
- #define UNION_WAIT /* This should really be checked for by autoconf */
- #endif
-
#ifndef HAVE_UNISTD_H
#if defined(PYCC_VACPP)
--- 119,122 ----
***************
*** 3324,3332 ****
return NULL;
Py_BEGIN_ALLOW_THREADS
- #ifdef NeXT
- pid = wait4(pid, &status, options, NULL);
- #else
pid = waitpid(pid, &status, options);
- #endif
Py_END_ALLOW_THREADS
if (pid == -1)
--- 3315,3319 ----
***************
*** 3970,4052 ****
}
#endif
-
- #ifdef NeXT
- #define HAVE_PUTENV
- /* Steve Spicklemire got this putenv from NeXTAnswers */
- static int
- putenv(char *newval)
- {
- extern char **environ;
-
- static int firstTime = 1;
- char **ep;
- char *cp;
- int esiz;
- char *np;
-
- if (!(np = strchr(newval, '=')))
- return 1;
- *np = '\0';
-
- /* look it up */
- for (ep=environ ; *ep ; ep++)
- {
- /* this should always be true... */
- if (cp = strchr(*ep, '='))
- {
- *cp = '\0';
- if (!strcmp(*ep, newval))
- {
- /* got it! */
- *cp = '=';
- break;
- }
- *cp = '=';
- }
- else
- {
- *np = '=';
- return 1;
- }
- }
-
- *np = '=';
- if (*ep)
- {
- /* the string was already there:
- just replace it with the new one */
- *ep = newval;
- return 0;
- }
-
- /* expand environ by one */
- for (esiz=2, ep=environ ; *ep ; ep++)
- esiz++;
- if (firstTime)
- {
- char **epp;
- char **newenv;
- if (!(newenv = malloc(esiz * sizeof(char *))))
- return 1;
-
- for (ep=environ, epp=newenv ; *ep ;)
- *epp++ = *ep++;
- *epp++ = newval;
- *epp = (char *) 0;
- environ = newenv;
- }
- else
- {
- if (!(environ = realloc(environ, esiz * sizeof(char *))))
- return 1;
- environ[esiz - 2] = newval;
- environ[esiz - 1] = (char *) 0;
- firstTime = 0;
- }
-
- return 0;
- }
- #endif /* NeXT */
-
#ifdef HAVE_PUTENV
--- 3957,3960 ----
Index: pwdmodule.c
===================================================================
RCS file: /cvsroot/python/python/dist/src/Modules/pwdmodule.c,v
retrieving revision 1.25
retrieving revision 1.26
diff -C2 -d -r1.25 -r1.26
*** pwdmodule.c 2001/03/11 03:03:07 1.25
--- pwdmodule.c 2002/02/01 15:46:29 1.26
***************
*** 25,37 ****
p->pw_name,
p->pw_passwd,
- #if defined(NeXT) && defined(_POSIX_SOURCE) && defined(__LITTLE_ENDIAN__)
- /* Correct a bug present on Intel machines in NextStep 3.2 and 3.3;
- for later versions you may have to remove this */
- (long)p->pw_short_pad1, /* ugh-NeXT broke the padding */
- (long)p->pw_short_pad2,
- #else
(long)p->pw_uid,
(long)p->pw_gid,
- #endif
p->pw_gecos,
p->pw_dir,
--- 25,30 ----