diffs to compile under SCO ODT 2.0

Lance Ellinghouse (lance@markv.com)
Thu, 9 Sep 93 15:15:52 PDT

Here is a set of diffs for the following files that will allow
PYTHON 0.9.9 to compile under SCO ODT 2.0. I have not included the
Makefile diffs but can make them available if someone wants them..
The diffs are for the following files:
ceval.c, posixmodule.c, socketmodule.c, timemodule.c

I hope these can get put into the distribution...

Thank you,
Lance Ellinghouse
lance@markv.com
===================================================================
RCS file: /u/lance/CVS/python/src/ceval.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 ceval.c
*** 1.1.1.1 1993/09/09 20:57:38
--- ceval.c 1993/09/09 22:02:40
***************
*** 92,98 ****
static void fast_2_locals PROTO((frameobject *));
static int access_statement PROTO((object *, object *, frameobject *));

-
/* Pointer to current frame, used to link new frames to */

static frameobject *current_frame;
--- 92,97 ----
***************
*** 1652,1658 ****
err_setval(error_type, error_value);
}

! static void
mergelocals()
{
locals_2_fast(current_frame, 1);
--- 1651,1657 ----
err_setval(error_type, error_value);
}

! void
mergelocals()
{
locals_2_fast(current_frame, 1);
===================================================================
RCS file: /u/lance/CVS/python/src/posixmodule.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 posixmodule.c
*** 1.1.1.1 1993/09/09 20:57:35
--- posixmodule.c 1993/09/09 22:05:16
***************
*** 35,41 ****
#include <dos.h>
#endif

! #ifdef __sgi
#define DO_PG
#endif

--- 35,41 ----
#include <dos.h>
#endif

! #if defined(__sgi) || defined(M_UNIX)
#define DO_PG
#endif

===================================================================
RCS file: /u/lance/CVS/python/src/socketmodule.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 socketmodule.c
*** 1.1.1.1 1993/09/09 20:57:35
--- socketmodule.c 1993/09/09 22:05:46
***************
*** 78,84 ****
--- 78,86 ----
#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
+ #ifndef M_UNIX
#include <sys/un.h>
+ #endif
#include <netdb.h>

#ifdef i860
***************
*** 233,243 ****
--- 235,247 ----
return ret;
}

+ #ifndef M_UNIX
case AF_UNIX:
{
struct sockaddr_un *a = (struct sockaddr_un *) addr;
return newstringobject(a->sun_path);
}
+ #endif

/* More cases here... */

***************
*** 263,268 ****
--- 267,273 ----
{
switch (s->sock_family) {

+ #ifndef M_UNIX
case AF_UNIX:
{
static struct sockaddr_un addr;
***************
*** 280,285 ****
--- 285,291 ----
*len_ret = len + sizeof addr.sun_family;
return 1;
}
+ #endif

case AF_INET:
{
***************
*** 318,328 ****
--- 324,336 ----
{
switch (s->sock_family) {

+ #ifndef M_UNIX
case AF_UNIX:
{
*len_ret = sizeof (struct sockaddr_un);
return 1;
}
+ #endif

case AF_INET:
{
***************
*** 1060,1066 ****
--- 1068,1076 ----
if (SocketError == NULL || dictinsert(d, "error", SocketError) != 0)
fatal("can't define socket.error");
insint(d, "AF_INET", AF_INET);
+ #ifndef M_UNIX
insint(d, "AF_UNIX", AF_UNIX);
+ #endif
insint(d, "SOCK_STREAM", SOCK_STREAM);
insint(d, "SOCK_DGRAM", SOCK_DGRAM);
insint(d, "SOCK_RAW", SOCK_RAW);
===================================================================
RCS file: /u/lance/CVS/python/src/timemodule.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 timemodule.c
*** 1.1.1.1 1993/09/09 20:58:47
--- timemodule.c 1993/09/09 22:06:02
***************
*** 38,43 ****
--- 38,47 ----
#include "myselect.h" /* Implies <sys/types.h>, <sys/time.h>, <sys/param.h> */
#endif

+ #ifdef M_UNIX
+ #define HAVE_GETTIMEOFDAY
+ #endif
+
#ifdef macintosh
#define NO_UNISTD
#endif
***************
*** 70,75 ****
--- 74,87 ----
#else /* !unix */
#include <time.h>
#endif /* !unix */
+
+ #ifdef M_UNIX
+ #include <time.h>
+ #define _timezone timezone
+ #define _altzone altzone
+ #define _daylight daylight
+ #define _tzname tzname
+ #endif

#ifdef SYSV
/* Access timezone stuff */