Diffs to build on SCO ODT 3.0

lance@fox.com
Sat, 1 Jan 94 18:53:16 PST

Below you will find 3 diff files that will allow the python1.0.0beta
to compile on SCO ODT 3.0. I will post more if necessary...
I really like the new install and build procedures..
Great work!!!

Sofar the changes have been to timemodule.c, selectmodule.c,
socketmodule.c, and Setup

*** timemodule.c.orig Sat Jan 1 18:23:55 1994
--- timemodule.c Sat Jan 1 18:26:59 1994
***************
*** 36,41 ****
--- 36,50 ----
#include <unistd.h>
#endif

+ /* LE: Jan 1, 1994: This is needed under SCO ODT 3.0
+ due to 'struct timeval' being defined in 'sys/time.h'
+ and 'sys/select.h'. 'sys/time.h' is not really needed
+ at this point for SCO ODT 3.0 */
+ #if defined(M_UNIX)
+ #define __sys_time_h__
+ #endif
+ /* LE: Jan 1, 1994 */
+
#include "mytime.h"

#if !HAVE_GETTIMEOFDAY && HAVE_FTIME

*** selectmodule.c.orig Sat Jan 1 18:28:28 1994
--- selectmodule.c Sat Jan 1 18:28:31 1994
***************
*** 29,34 ****
--- 29,42 ----
#include "ceval.h"

#include <sys/types.h>
+
+ /* LE: Jan 1, 1994: This is needed due to duplicate definitions
+ of 'struct timeval'. See 'timemodule.c' for full details */
+ #if defined(M_UNIX)
+ #define __sys_time_h__
+ #endif
+ /* LE; Jan 1, 1994 */
+
#include "mytime.h"
#include "myselect.h"

*** socketmodule.c.orig Sat Jan 1 18:30:55 1994
--- socketmodule.c Sat Jan 1 18:36:47 1994
***************
*** 74,86 ****
--- 74,98 ----
#include "ceval.h"

#include <sys/types.h>
+
+ /* LE: Jan 1, 1994: This is not needed due to duplicate definitions.
+ See 'timemodule.c' for full details */
+ #if defined(M_UNIX)
+ #define __sys_time_h__
+ #endif
+ /* LE: Jan 1, 1994 */
+
#include "mytime.h"
#include "myselect.h"

#include <signal.h>
#include <sys/socket.h>
#include <netinet/in.h>
+ /* LE: Jan 1, 1994: SCO ODT 3.0 does not support AF_UNIX sockets */
+ #if !defined(M_UNIX)
#include <sys/un.h>
+ #endif
+ /* LE: Jan 1, 1994 */
#include <netdb.h>

#ifdef i860
***************
*** 235,245 ****
--- 247,261 ----
return ret;
}

+ /* LE: Jan 1, 1994: SCO ODT 3.0 does not have AF_UNIX sockets */
+ #if !defined(M_UNIX)
case AF_UNIX:
{
struct sockaddr_un *a = (struct sockaddr_un *) addr;
return newstringobject(a->sun_path);
}
+ #endif
+ /* LE: Jan 1, 1994 */

/* More cases here... */

***************
*** 265,270 ****
--- 281,288 ----
{
switch (s->sock_family) {

+ /* LE: Jan 1, 1994: SCO ODT 3.0 does not support AF_UNIX sockets */
+ #if !defined(M_UNIX)
case AF_UNIX:
{
static struct sockaddr_un addr;
***************
*** 282,287 ****
--- 300,307 ----
*len_ret = len + sizeof addr.sun_family;
return 1;
}
+ #endif
+ /* LE: Jan 1, 1994 */

case AF_INET:
{
***************
*** 320,330 ****
--- 340,354 ----
{
switch (s->sock_family) {

+ /* LE: Jan 1, 1994: SCO ODT 3.0 does not have AF_UNIX sockets */
+ #if !defined(M_UNIX)
case AF_UNIX:
{
*len_ret = sizeof (struct sockaddr_un);
return 1;
}
+ #endif
+ /* LE: Jan 1, 1994 */

case AF_INET:
{
***************
*** 1063,1069 ****
--- 1087,1097 ----
if (SocketError == NULL || dictinsert(d, "error", SocketError) != 0)
fatal("can't define socket.error");
insint(d, "AF_INET", AF_INET);
+ /* LE: Jan 1, 1994: SCO ODT 3.0 does not have AF_UNIX sockets */
+ #if !defined(M_UNIX)
insint(d, "AF_UNIX", AF_UNIX);
+ #endif
+ /* LE: Jan 1, 1994 */
insint(d, "SOCK_STREAM", SOCK_STREAM);
insint(d, "SOCK_DGRAM", SOCK_DGRAM);
insint(d, "SOCK_RAW", SOCK_RAW);

*** Setup.orig Sat Jan 1 18:46:36 1994
--- Setup Sat Jan 1 18:48:02 1994
***************
*** 44,50 ****
# Note that some UNIX versions still don't support all of these
# so you may have to comment them out before the build completes.

! dbm dbmmodule.o # dbm(3) may require -ldbm or similar
fcntl fcntlmodule.o # fcntl(2) and ioctl(2)
# nis nismodule.o # Sun yellow pages -- not everywhere
pwd grp pwdmodule.o # pwd(3) and grp(3)
--- 44,50 ----
# Note that some UNIX versions still don't support all of these
# so you may have to comment them out before the build completes.

! dbm dbmmodule.o -lndbm # dbm(3) may require -ldbm or similar
fcntl fcntlmodule.o # fcntl(2) and ioctl(2)
# nis nismodule.o # Sun yellow pages -- not everywhere
pwd grp pwdmodule.o # pwd(3) and grp(3)

--
Lance Ellinghouse                lance@fox.com