Added separate main program for the Mac: macmain.c
stdwinmodule.c: wsetfont can now return an error
Makefile: add CL_USE and CL_LIB*S; config.c: move CL part around
New things in imgfile; also in Makefile.
longobject.c: fix comparison of negative long ints... [REAL BUG!]
marshal.c: add dumps() and loads() to read/write strings
timemodule.c: make sure there's always a floatsleep()
posixmodule.c: rationalize struct returned by times()
Makefile: add test target, disable imgfile by default
thread.c: Improved coexistance with dl module (sjoerd)
stdwinmodule.c: Change include stdwin.h if macintosh
rotormodule.c: added missing last argument to RTR_?_region calls
confic.c: merged with configmac.c, added 1993 to copyright message
fileobject.c: int compared to NULL in writestring(); change fopenRF ifdef
timemodule.c: simplify times() using mkvalue; include myselect.h
earlier (for sequent).
posixmodule: for sequent, include unistd.h instead of explicit
extern definitions and don't define rename()
Makefile: change misleading/wrong MD5 comments
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c
index bab0c59..a600115 100644
--- a/Modules/posixmodule.c
+++ b/Modules/posixmodule.c
@@ -75,6 +75,9 @@
#include "modsupport.h"
#include "ceval.h"
+#ifdef _SEQUENT_
+#include <unistd.h>
+#else /* _SEQUENT_ */
/* XXX Aren't these always declared in unistd.h? */
extern char *strerror PROTO((int));
extern int chmod PROTO((const char *, mode_t));
@@ -87,6 +90,7 @@
extern int stat PROTO((const char *, struct stat *));
extern int unlink PROTO((const char *));
extern int pclose PROTO((FILE *));
+#endif /* _SEQUENT_ */
#ifdef NO_LSTAT
#define lstat stat
#else
@@ -375,7 +379,7 @@
}
#endif
-#ifdef i386
+#if i386 && ! _SEQUENT_
int
rename(from, to)
char *from;
@@ -388,7 +392,7 @@
return status;
return unlink(from);
}
-#endif /* i386 */
+#endif /* i386 && ! _SEQUENT_ */
static object *
posix_rename(self, args)
@@ -833,7 +837,6 @@
{
struct tms t;
clock_t c;
- object *tuple;
if (!getnoarg(args))
return NULL;
errno = 0;
@@ -842,18 +845,11 @@
err_errno(PosixError);
return NULL;
}
- tuple = newtupleobject(4);
- if (tuple == NULL)
- return NULL;
- settupleitem(tuple, 0, newfloatobject((double)t.tms_utime / HZ));
- settupleitem(tuple, 1, newfloatobject((double)t.tms_stime / HZ));
- settupleitem(tuple, 2, newfloatobject((double)t.tms_cutime / HZ));
- settupleitem(tuple, 3, newfloatobject((double)t.tms_cstime / HZ));
- if (err_occurred()) {
- DECREF(tuple);
- return NULL;
- }
- return tuple;
+ return mkvalue("dddd",
+ (double)t.tms_utime / HZ,
+ (double)t.tms_stime / HZ,
+ (double)t.tms_cutime / HZ,
+ (double)t.tms_cstime / HZ);
}
#endif /* DO_TIMES */