#include <sys/un.h>
#include <netdb.h>
+#ifdef i860
+/* Cray APP doesn't have getpeername() */
+#define NO_GETPEERNAME
+#endif
+
/* Global variable holding the exception type for errors detected
by this module (but not argument type or memory errors, etc.). */
}
+#ifndef NO_GETPEERNAME
/* s.getpeername() method */
static object *
return socket_error();
return makesockaddr((struct sockaddr *) addrbuf, addrlen);
}
+#endif
/* s.listen(n) method */
{"connect", sock_connect},
{"fileno", sock_fileno},
{"getsockname", sock_getsockname},
+#ifndef NO_GETPEERNAME
{"getpeername", sock_getpeername},
+#endif
{"listen", sock_listen},
{"makefile", sock_makefile},
{"recv", sock_recv},
#include <ctype.h>
#include <math.h>
+#ifdef i860
+/* Cray APP has bogus definition of HUGE_VAL in <math.h> */
+#undef HUGE_VAL
+#endif
+
#ifdef HUGE_VAL
#define CHECK(x) if (errno != 0) ; \
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
}
else {
fractpart = frexp(fractpart, &expo);
+ fractpart = fractpart*4294967296.0; /* 2**32 */
x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
}
if (x == -1)