# === Variables set by makesetup ===
-MODOBJS= @MODOBJS@
-MODLIBS= @MODLIBS@
+MODOBJS= _MODOBJS_
+MODLIBS= _MODLIBS_
# === Definitions added by makesetup ===
# Machine-dependent subdirectories
MACHDEP= @MACHDEP@
-# Install prefix, may be changed by configure
-prefix= /usr/local
+# Install prefix for architecture-independent files
+prefix= @prefix@
+
+# Install prefix for architecture-dependent files
+exec_prefix= @exec_prefix@
# Symbols used for using shared libraries
SO= @SO@
LDSHARED= @LDSHARED@
CCSHARED= @CCSHARED@
LINKFORSHARED= @LINKFORSHARED@
-DESTSHARED= $(prefix)/lib/python/$(MACHDEP)
+DESTSHARED= $(exec_prefix)/lib/python/$(MACHDEP)
# === Variables that are customizable by hand ===
# Rules to build and install all shared modules
sharedmods: $(SHAREDMODS)
sharedinstall: $(SHAREDMODS)
- for i in $(SHAREDMODS); do mv $$i $(DESTSHARED)/$$i; done
+ for i in dummy $(SHAREDMODS); do \
+ if test -f $$i; then mv $$i $(DESTSHARED)/$$i; fi; done
# Stuff is appended here by makesetup and make depend
static int errorInCmd = 0;
static PyObject *excInCmd;
static PyObject *valInCmd;
+static PyObject *trbInCmd;
static PyObject *
Tkinter_Error (v)
Tcl_Interp *interp;
{
errorInCmd = 1;
- PyErr_GetAndClear (&excInCmd, &valInCmd);
+ PyErr_Fetch (&excInCmd, &valInCmd, &trbInCmd);
return TCL_ERROR;
}
if (res == NULL)
{
errorInCmd = 1;
- PyErr_GetAndClear (&excInCmd, &valInCmd);
+ PyErr_Fetch (&excInCmd, &valInCmd, &trbInCmd);
}
Py_XDECREF (res);
}
if (res == NULL)
{
errorInCmd = 1;
- PyErr_GetAndClear (&excInCmd, &valInCmd);
+ PyErr_Fetch (&excInCmd, &valInCmd, &trbInCmd);
}
- Py_DECREF (res);
+ else
+ Py_DECREF (res);
}
static PyObject *
if (errorInCmd)
{
errorInCmd = 0;
- PyErr_SetObject (excInCmd, valInCmd);
+ PyErr_Restore (excInCmd, valInCmd, trbInCmd);
+ excInCmd = valInCmd = trbInCmd = NULL;
return NULL;
}
Py_INCREF (Py_None);
if (errorInCmd) /* XXX Reset tty */
{
errorInCmd = 0;
- PyErr_SetObject (excInCmd, valInCmd);
+ PyErr_Restore (excInCmd, valInCmd, trbInCmd);
+ excInCmd = valInCmd = trbInCmd = NULL;
PyErr_Print ();
}
if (tk_NumMainWindows > 0)
int size;
struct arraydescr *descr;
{
- int i;
arrayobject *op;
size_t nbytes;
- int itemsize;
if (size < 0) {
err_badcall();
return NULL;
int where;
object *v;
{
- int i;
char *items;
if (v == NULL) {
err_badcall();
array_dealloc(op)
arrayobject *op;
{
- int i;
if (op->ob_item != NULL)
DEL(op->ob_item);
DEL(op);
int ilow, ihigh;
{
arrayobject *np;
- int i;
if (ilow < 0)
ilow = 0;
else if (ilow > a->ob_size)
object *bb;
{
int size;
- int i;
arrayobject *np;
if (!is_arrayobject(bb)) {
err_badarg();
arrayobject *a;
int n;
{
- int i, j;
+ int i;
int size;
arrayobject *np;
char *p;
char *item;
int n; /* Size of replacement array */
int d; /* Change in size */
- int k; /* Loop index */
#define b ((arrayobject *)v)
if (v == NULL)
n = 0;
}
/* End of code taken from sox */
-/* ADPCM-3 step variation table */
-static float newstep[5] = { 0.8, 0.9, 1.0, 1.75, 1.75 };
-
/* Intel ADPCM step variation table */
static int indexTable[16] = {
-1, -1, -1, -1, 2, 4, 6, 8,
signed char *cp;
int len, size, val;
int i;
- int cross, prevval, ncross;
+ int prevval, ncross;
if ( !getargs(args, "(s#i)", &cp, &len, &size) )
return 0;
{
signed char *cp;
signed char *ncp;
- int len, size, val, valpred, step, delta, index, sign, vpdiff;
+ int len, size, valpred, step, delta, index, sign, vpdiff;
object *rv, *str, *state;
int i, inputbuffer, bufferstep;
/* -- ADDMODULE MARKER 1 -- */
extern void initmarshal();
+extern void initimp();
struct {
char *name;
/* This module "lives in" with marshal.c */
{"marshal", initmarshal},
+ /* This lives it with import.c */
+ {"imp", initimp},
+
/* These entries are here for sys.builtin_module_names */
{"__main__", NULL},
{"__builtin__", NULL},
{
int maxx, maxy, x, y, len;
int i;
- unsigned char *cp, *ncp, cdata;
+ unsigned char *cp, *ncp;
int width;
object *rv;
{
int v0, v1, x, y, len, nlen;
unsigned char *cp, *ncp;
- unsigned char ovalue;
object *rv;
- int i, bit, value;
+ int i, bit;
if ( !getargs(args, "(s#iiii)", &cp, &len, &x, &y, &v0, &v1) )
return 0;
{
int x, y, len, nlen;
unsigned char *cp, *ncp;
- unsigned char ovalue;
object *rv;
int i, pos, value, nvalue;
{
int x, y, len, nlen;
unsigned char *cp, *ncp;
- unsigned char ovalue;
object *rv;
int i, pos, value, nvalue;
#
# Copying Makefile.pre to Makefile:
# - insert an identifying comment at the start
-# - replace @MODOBJS@ by the list of objects from Setup (except for
+# - replace _MODOBJS_ by the list of objects from Setup (except for
# Setup files after a -n option)
-# - replace @MODLIBS@ by the list of libraries from Setup
+# - replace _MODLIBS_ by the list of libraries from Setup
# - for each object file mentioned in Setup, append a rule
# '<file>.o: <file>.c; <build commands>' to the end of the Makefile
# - for each module mentioned in Setup, append a rule
echo "1i\\" >$sedf
str="# Generated automatically from $makepre by makesetup."
echo "$str" >>$sedf
- echo "s%@MODOBJS@%$OBJS%" >>$sedf
- echo "s%@MODLIBS@%$LIBS%" >>$sedf
+ echo "s%_MODOBJS_%$OBJS%" >>$sedf
+ echo "s%_MODLIBS_%$LIBS%" >>$sedf
echo "/Definitions added by makesetup/a$NL$NL$DEFS" >>$sedf
sed -f $sedf $makepre >Makefile
cat $rulesf >>Makefile
FUNC1(math_fabs, fabs)
FUNC1(math_floor, floor)
FUNC2(math_fmod, fmod)
+#ifdef HAVE_HYPOT
FUNC2(math_hypot, hypot)
+#endif
FUNC1(math_log, log)
FUNC1(math_log10, log10)
#ifdef MPW_3_1 /* This hack is needed for MPW 3.1 but not for 3.2 ... */
{"floor", math_floor},
{"fmod", math_fmod},
{"frexp", math_frexp},
+#ifdef HAVE_HYPOT
{"hypot", math_hypot},
+#endif
{"ldexp", math_ldexp},
{"log", math_log},
{"log10", math_log10},
/* MD5 functions */
static object *
-MD5_md5(self, args)
+MD5_new(self, args)
object *self;
object *args;
{
/* List of functions exported by this module */
static struct methodlist md5_functions[] = {
- {"md5", (method)MD5_md5},
+ {"new", (method)MD5_new},
+ {"md5", (method)MD5_new}, /* Backward compatibility */
{NULL, NULL} /* Sentinel */
};
#include "allobjects.h"
#include "modsupport.h" /* For getargs() etc. */
+#include "rename1.h"
#include <assert.h>
#include <sys/types.h> /* For size_t */
} /* mpz_div_and_mod() */
static object *
-mpz_power(a, b)
+mpz_power(a, b, m)
mpzobject *a;
mpzobject *b;
+ mpzobject *m;
{
mpzobject *z;
int cmpres;
long int longtmp1, longtmp2;
+ if ((object *)m!=Py_None)
+ {
+ mpzobject *z2;
+ INCREF(Py_None);
+ z=mpz_power(a, b, (mpzobject *)Py_None);
+ DECREF(Py_None);
+ if (z==NULL) return(z);
+ z2=mpz_remainder(z, m);
+ DECREF(z);
+ return((object *)z2);
+ }
if ((cmpres = mpz_cmp_ui(&b->mpz, (unsigned long int)0)) == 0) {
/* the gnu-mp lib sets pow(0,0) to 0, we to 1 */
#define UF (unaryfunc)
#define BF (binaryfunc)
+#define TF (ternaryfunc)
#define IF (inquiry)
#define CF (coercion)
BF mpz_divide, /*nb_divide*/
BF mpz_remainder, /*nb_remainder*/
BF mpz_div_and_mod, /*nb_divmod*/
- BF mpz_power, /*nb_power*/
+ TF mpz_power, /*nb_power*/
UF mpz_negative, /*nb_negative*/
UF mpz_positive, /*tp_positive*/
UF mpz_absolute, /*tp_absolute*/
/* create some frequently used constants */
if ((mpz_value_zero = newmpzobject()) == NULL)
- fatal("initmpz: can't initialize mpz contstants");
+ fatal("initmpz: can't initialize mpz constants");
mpz_set_ui(&mpz_value_zero->mpz, (unsigned long int)0);
if ((mpz_value_one = newmpzobject()) == NULL)
- fatal("initmpz: can't initialize mpz contstants");
+ fatal("initmpz: can't initialize mpz constants");
mpz_set_ui(&mpz_value_one->mpz, (unsigned long int)1);
if ((mpz_value_mone = newmpzobject()) == NULL)
- fatal("initmpz: can't initialize mpz contstants");
+ fatal("initmpz: can't initialize mpz constants");
mpz_set_si(&mpz_value_mone->mpz, (long)-1);
} /* initmpz() */
char *filename;
FILE *fp;
node *n = NULL;
- int err;
object *res;
if (!getargs(args, "s", &filename))
return NULL;
#define MAXPATHLEN 1024
#endif /* MAXPATHLEN */
-/* unistd.h defines _POSIX_VERSION on POSIX.1 systems. */
-#if defined(DIRENT) || defined(_POSIX_VERSION)
+#ifdef HAVE_DIRENT_H
#include <dirent.h>
-#define NLENGTH(dirent) (strlen((dirent)->d_name))
-#else /* not (DIRENT or _POSIX_VERSION) */
+#define NAMLEN(dirent) strlen((dirent)->d_name)
+#else
#define dirent direct
-#define NLENGTH(dirent) ((dirent)->d_namlen)
-#ifdef SYSNDIR
+#define NAMLEN(dirent) (dirent)->d_namlen
+#ifdef HAVE_SYS_NDIR_H
#include <sys/ndir.h>
-#endif /* SYSNDIR */
-#ifdef SYSDIR
+#endif
+#ifdef HAVE_SYS_DIR_H
#include <sys/dir.h>
-#endif /* SYSDIR */
-#ifdef NDIR
+#endif
+#ifdef HAVE_NDIR_H
#include <ndir.h>
-#endif /* NDIR */
-#endif /* not (DIRENT or _POSIX_VERSION) */
+#endif
+#endif
#ifdef NT
#include <direct.h>
return NULL;
}
while ((ep = readdir(dirp)) != NULL) {
- v = newstringobject(ep->d_name);
+ v = newsizedstringobject(ep->d_name, NAMLEN(ep));
if (v == NULL) {
DECREF(d);
d = NULL;
long *starttab, *lengthtab;
FILE *inf;
IMAGE image;
- int y, z, pos, len, tablen;
+ int y, z, tablen;
int xsize, ysize, zsize;
int bpp, rle, cur, badorder;
int rlebuflen;
(list k1 (logior 1 k2) k3 k4 k5)))*/
/* This is done in set_key() above */
+#if 0
/*(defun encrypt-region (beg end key)
"Interactivly encrypt the region"
(interactive "r\nsKey:")
{
RTR_d_region(r,region,len,TRUE);
}
+#endif
/* Rotor methods */
PyRotorObject *self;
PyObject * args;
{
- char *key;
char *string;
if (PyArg_Parse(args,"s",&string))
******************************************************************/
-/* Signal module -- many thanks to Lance Ellinghouse */
+/* Signal module -- many thanks to Lance Ellinghaus */
#include "Python.h"
#include "intrcheck.h"
#define SIG_ERR ((RETSIGTYPE (*)())-1)
#endif
+#ifndef NSIG
+#define NSIG (_SIGMAX + 1) /* For QNX */
+#endif
+
+
/*
NOTES ON THE INTERACTION BETWEEN SIGNALS AND THREADS
PyObject *args;
{
int t;
- int rtn;
if (!PyArg_Parse(args, "i", &t))
return (PyObject *)NULL;
/* alarm() returns the number of seconds remaining */
initsignal()
{
PyObject *m, *d, *x;
- PyObject *b_dict;
int i;
#ifdef WITH_THREAD
- socket.gethostname() --> host name (string)
- socket.gethostbyname(hostname) --> host IP address (string: 'dd.dd.dd.dd')
+- socket.gethostbyaddr(IP address) --> (hostname, [alias, ...], [IP addr, ...])
- socket.getservbyname(servername, protocolname) --> port number
- socket.socket(family, type [, proto]) --> new socket object
- family and type constants from <socket.h> are accessed as socket.AF_INET etc.
- s.setblocking(1 | 0) --> Py_None
- s.shutdown(how) --> Py_None
- s.close() --> Py_None
+- repr(s) --> "<socket object, fd=%d, family=%d, type=%d, protocol=%d>"
*/
#undef AF_UNIX
#endif
+#ifndef O_NDELAY
+#define O_NDELAY O_NONBLOCK /* For QNX only? */
+#endif
+
+
/* Here we have some hacks to choose between K&R or ANSI style function
definitions. For NT to build this as an extension module (ie, DLL)
it must be compiled by the C++ compiler, as it takes the address of
int sock_family; /* Address family, e.g., AF_INET */
int sock_type; /* Socket type, e.g., SOCK_STREAM */
int sock_proto; /* Protocol type, usually 0 */
+ union sock_addr {
+ struct sockaddr_in in;
+#ifdef AF_UNIX
+ struct sockaddr_un un;
+#endif
+ } sock_addr;
} PySocketSockObject;
in NEWOBJ()). */
static PySocketSockObject *
-BUILD_FUNC_DEF_4(PySocketSock_New, int, fd, int, family, int, type, int, proto)
+BUILD_FUNC_DEF_4(PySocketSock_New,int,fd, int,family, int,type, int,proto)
{
PySocketSockObject *s;
s = PyObject_NEW(PySocketSockObject, &PySocketSock_Type);
an error occurred; then an exception is raised. */
static int
-BUILD_FUNC_DEF_2(setipaddr, char*, name, struct sockaddr_in *, addr_ret)
+BUILD_FUNC_DEF_2(setipaddr, char*,name, struct sockaddr_in *,addr_ret)
{
struct hostent *hp;
int d1, d2, d3, d4;
char ch;
+#ifdef HAVE_GETHOSTBYNAME_R
+ struct hostent hp_allocated;
+ char buf[1001];
+ int buf_len = (sizeof buf) - 1;
+ int errnop;
+#endif /* HAVE_GETHOSTBYNAME_R */
if (name[0] == '\0') {
addr_ret->sin_addr.s_addr = INADDR_ANY;
((long) d3 << 8) | ((long) d4 << 0));
return 4;
}
+#ifdef HAVE_GETHOSTBYNAME_R
Py_BEGIN_ALLOW_THREADS
- hp = gethostbyname(name);
+ hp = gethostbyname_r(name, &hp_allocated, buf, buf_len, &errnop);
Py_END_ALLOW_THREADS
+#else /* not HAVE_GETHOSTBYNAME_R */
+ hp = gethostbyname(name);
+#endif /* HAVE_GETHOSTBYNAME_R */
+
if (hp == NULL) {
+#ifndef NT
+ /* Let's get real error message to return */
+ extern int h_errno;
+ PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));
+#else
PyErr_SetString(PySocket_Error, "host not found");
+#endif
return -1;
}
memcpy((char *) &addr_ret->sin_addr, hp->h_addr, hp->h_length);
/*ARGSUSED*/
static PyObject *
-BUILD_FUNC_DEF_2(makesockaddr,struct sockaddr *, addr, int, addrlen)
+BUILD_FUNC_DEF_2(makesockaddr,struct sockaddr *,addr, int,addrlen)
{
if (addrlen == 0) {
/* No address -- may be recvfrom() from known socket */
#ifdef AF_UNIX
case AF_UNIX:
{
- static struct sockaddr_un addr;
+ struct sockaddr_un* addr;
char *path;
int len;
+ addr = (struct sockaddr_un* )&(s->sock_addr).un;
if (!PyArg_Parse(args, "s#", &path, &len))
return 0;
- if (len > sizeof addr.sun_path) {
+ if (len > sizeof addr->sun_path) {
PyErr_SetString(PySocket_Error, "AF_UNIX path too long");
return 0;
}
- addr.sun_family = AF_UNIX;
- memcpy(addr.sun_path, path, len);
- *addr_ret = (struct sockaddr *) &addr;
- *len_ret = len + sizeof addr.sun_family;
+ addr->sun_family = AF_UNIX;
+ memcpy(addr->sun_path, path, len);
+ *addr_ret = (struct sockaddr *) addr;
+ *len_ret = len + sizeof addr->sun_family;
return 1;
}
#endif /* AF_UNIX */
case AF_INET:
{
- static struct sockaddr_in addr;
+ struct sockaddr_in* addr;
char *host;
int port;
+ addr=(struct sockaddr_in*)&(s->sock_addr).in;
if (!PyArg_Parse(args, "(si)", &host, &port))
return 0;
- if (setipaddr(host, &addr) < 0)
+ if (setipaddr(host, addr) < 0)
return 0;
- addr.sin_family = AF_INET;
- addr.sin_port = htons(port);
- *addr_ret = (struct sockaddr *) &addr;
- *len_ret = sizeof addr;
+ addr->sin_family = AF_INET;
+ addr->sin_port = htons(port);
+ *addr_ret = (struct sockaddr *) addr;
+ *len_ret = sizeof *addr;
return 1;
}
#ifndef NT
(ANY *)addrbuf, &addrlen);
#else
- (struct sockaddr *)addrbuf, &addrlen);
+ (struct sockaddr *)addrbuf, &addrlen);
#endif
Py_END_ALLOW_THREADS
if (n < 0)
{"allowbroadcast", (PyCFunction)PySocketSock_allowbroadcast},
#endif
#ifndef NT
- {"setblocking", (PyCFunction)PySocketSock_setblocking},
+ {"setblocking", (PyCFunction)PySocketSock_setblocking},
#endif
{"setsockopt", (PyCFunction)PySocketSock_setsockopt},
{"getsockopt", (PyCFunction)PySocketSock_getsockopt},
First close the file description. */
static void
-BUILD_FUNC_DEF_1(PySocketSock_dealloc, PySocketSockObject *,s)
+BUILD_FUNC_DEF_1(PySocketSock_dealloc,PySocketSockObject *,s)
{
(void) close(s->sock_fd);
PyMem_DEL(s);
}
+static PyObject *
+BUILD_FUNC_DEF_1(PySocketSock_repr,PySocketSockObject *,s)
+{
+ PyObject *addro;
+ struct sockaddr *addr;
+ char buf[512];
+ object *t, *comma, *v;
+ int i, len;
+ sprintf(buf,
+ "<socket object, fd=%d, family=%d, type=%d, protocol=%d>",
+ s->sock_fd, s->sock_family, s->sock_type, s->sock_proto);
+ t = newstringobject(buf);
+ return t;
+}
+
+
/* Type object for socket objects. */
static PyTypeObject PySocketSock_Type = {
(getattrfunc)PySocketSock_getattr, /*tp_getattr*/
0, /*tp_setattr*/
0, /*tp_compare*/
- 0, /*tp_repr*/
+ (reprfunc)PySocketSock_repr, /*tp_repr*/
0, /*tp_as_number*/
0, /*tp_as_sequence*/
0, /*tp_as_mapping*/
return makeipaddr(&addrbuf);
}
+/* Python interface to gethostbyaddr(IP). */
+
+/*ARGSUSED*/
+static PyObject *
+BUILD_FUNC_DEF_2(PySocket_gethostbyaddr,PyObject *,self, PyObject *, args)
+{
+ struct sockaddr_in addr;
+ char *ip_num;
+ struct hostent *h;
+ int d1,d2,d3,d4;
+ char ch, **pch;
+ PyObject *rtn_tuple = (PyObject *)NULL;
+ PyObject *name_list = (PyObject *)NULL;
+ PyObject *addr_list = (PyObject *)NULL;
+ PyObject *tmp;
+
+ if (!PyArg_Parse(args, "s", &ip_num))
+ return NULL;
+ if (setipaddr(ip_num, &addr) < 0)
+ return NULL;
+ h = gethostbyaddr((char *)&addr.sin_addr,
+ sizeof(addr.sin_addr),
+ AF_INET);
+ if (h == NULL) {
+#ifndef NT
+ /* Let's get real error message to return */
+ extern int h_errno;
+ PyErr_SetString(PySocket_Error, (char *)hstrerror(h_errno));
+#else
+ PyErr_SetString(PySocket_Error, "host not found");
+#endif
+ return NULL;
+ }
+ if ((name_list = PyList_New(0)) == NULL)
+ goto err;
+ if ((addr_list = PyList_New(0)) == NULL)
+ goto err;
+ for (pch = h->h_aliases; *pch != NULL; pch++) {
+ tmp = PyString_FromString(*pch);
+ if (tmp == NULL)
+ goto err;
+ PyList_Append(name_list, tmp);
+ Py_DECREF(tmp);
+ }
+ for (pch = h->h_addr_list; *pch != NULL; pch++) {
+ memcpy((char *) &addr.sin_addr, *pch, h->h_length);
+ tmp = makeipaddr(&addr);
+ if (tmp == NULL)
+ goto err;
+ PyList_Append(addr_list, tmp);
+ Py_DECREF(tmp);
+ }
+ rtn_tuple = Py_BuildValue("sOO", h->h_name, name_list, addr_list);
+ err:
+ Py_XDECREF(name_list);
+ Py_XDECREF(addr_list);
+ return rtn_tuple;
+}
+
/* Python interface to getservbyname(name).
This only returns the port number, since the other info is already
/*ARGSUSED*/
static PyObject *
-BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self,PyObject *,args)
+BUILD_FUNC_DEF_2(PySocket_socket,PyObject *,self, PyObject *,args)
{
PySocketSockObject *s;
int fd, family, type, proto;
/*ARGSUSED*/
static PyObject *
-BUILD_FUNC_DEF_2(PySocket_fromfd,PyObject *,self,PyObject *,args)
+BUILD_FUNC_DEF_2(PySocket_fromfd,PyObject *,self, PyObject *,args)
{
PySocketSockObject *s;
int fd, family, type, proto;
static PyMethodDef PySocket_methods[] = {
{"gethostbyname", PySocket_gethostbyname},
+ {"gethostbyaddr", PySocket_gethostbyaddr},
{"gethostname", PySocket_gethostname},
{"getservbyname", PySocket_getservbyname},
{"socket", PySocket_socket},
For simplicity, errors (which are unlikely anyway) are ignored. */
static void
-BUILD_FUNC_DEF_3(insint,PyObject *,d,char *,name,int,value)
+BUILD_FUNC_DEF_3(insint,PyObject *,d, char *,name, int,value)
{
PyObject *v = PyInt_FromLong((long) value);
if (v == NULL) {
fprintf(stderr, "Unhandled exception in thread:\n");
print_error(); /* From pythonmain.c */
}
- (void) save_thread();
+ else
+ DECREF(res);
+ (void) save_thread(); /* Should always be NULL */
exit_thread();
}
object *self; /* Not used */
object *args;
{
+ object *frame;
if (!getnoarg(args))
return NULL;
- (void) save_thread();
+ frame = save_thread(); /* Should never be NULL */
+ DECREF(frame);
exit_thread();
for (;;) { } /* Should not be reached */
}
#ifdef HAVE_GETTIMEOFDAY
{
struct timeval t;
+#ifdef GETTIMEOFDAY_NO_TZ
+ if (gettimeofday(&t) == 0)
+ return (double)t.tv_sec + t.tv_usec*0.000001;
+#else /* !GETTIMEOFDAY_NO_TZ */
if (gettimeofday(&t, (struct timezone *)NULL) == 0)
return (double)t.tv_sec + t.tv_usec*0.000001;
+#endif /* !GETTIMEOFDAY_NO_TZ */
}
#endif /* !HAVE_GETTIMEOFDAY */
{