mirror of
https://github.com/python/cpython.git
synced 2025-09-27 18:59:43 +00:00
* Microscopic corrections to make things compile on the Cray APP.
* Removed one use of $> in Makefile and warned about others. Added configurable lines in Makefile to change CC and AR.
This commit is contained in:
parent
f56e3db1dd
commit
9575a44575
6 changed files with 32 additions and 5 deletions
|
@ -31,8 +31,16 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||||
#include "modsupport.h"
|
#include "modsupport.h"
|
||||||
#include "ceval.h"
|
#include "ceval.h"
|
||||||
|
|
||||||
#ifdef sun
|
#ifdef i860
|
||||||
|
/* Cray APP doesn't have memmove */
|
||||||
#define NEED_MEMMOVE
|
#define NEED_MEMMOVE
|
||||||
|
extern char *memcpy();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef sun
|
||||||
|
/* SunOS doesn't have memmove */
|
||||||
|
#define NEED_MEMMOVE
|
||||||
|
extern char *memcpy();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef NEED_MEMMOVE
|
#ifdef NEED_MEMMOVE
|
||||||
|
|
|
@ -35,6 +35,11 @@ extern int errno;
|
||||||
|
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef i860
|
||||||
|
/* Cray APP has bogus definition of HUGE_VAL in <math.h> */
|
||||||
|
#undef HUGE_VAL
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifndef __STDC__
|
#ifndef __STDC__
|
||||||
extern double fmod PROTO((double, double));
|
extern double fmod PROTO((double, double));
|
||||||
#endif
|
#endif
|
||||||
|
|
|
@ -82,6 +82,11 @@ Socket methods:
|
||||||
#include <sys/un.h>
|
#include <sys/un.h>
|
||||||
#include <netdb.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
|
/* Global variable holding the exception type for errors detected
|
||||||
by this module (but not argument type or memory errors, etc.). */
|
by this module (but not argument type or memory errors, etc.). */
|
||||||
|
@ -594,6 +599,7 @@ sock_getsockname(s, args)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifndef NO_GETPEERNAME
|
||||||
/* s.getpeername() method */
|
/* s.getpeername() method */
|
||||||
|
|
||||||
static object *
|
static object *
|
||||||
|
@ -614,6 +620,7 @@ sock_getpeername(s, args)
|
||||||
return socket_error();
|
return socket_error();
|
||||||
return makesockaddr((struct sockaddr *) addrbuf, addrlen);
|
return makesockaddr((struct sockaddr *) addrbuf, addrlen);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* s.listen(n) method */
|
/* s.listen(n) method */
|
||||||
|
@ -809,7 +816,9 @@ static struct methodlist sock_methods[] = {
|
||||||
{"connect", sock_connect},
|
{"connect", sock_connect},
|
||||||
{"fileno", sock_fileno},
|
{"fileno", sock_fileno},
|
||||||
{"getsockname", sock_getsockname},
|
{"getsockname", sock_getsockname},
|
||||||
|
#ifndef NO_GETPEERNAME
|
||||||
{"getpeername", sock_getpeername},
|
{"getpeername", sock_getpeername},
|
||||||
|
#endif
|
||||||
{"listen", sock_listen},
|
{"listen", sock_listen},
|
||||||
{"makefile", sock_makefile},
|
{"makefile", sock_makefile},
|
||||||
{"recv", sock_recv},
|
{"recv", sock_recv},
|
||||||
|
|
|
@ -38,6 +38,11 @@ extern int errno;
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
#ifdef i860
|
||||||
|
/* Cray APP has bogus definition of HUGE_VAL in <math.h> */
|
||||||
|
#undef HUGE_VAL
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef HUGE_VAL
|
#ifdef HUGE_VAL
|
||||||
#define CHECK(x) if (errno != 0) ; \
|
#define CHECK(x) if (errno != 0) ; \
|
||||||
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
|
else if (-HUGE_VAL <= (x) && (x) <= HUGE_VAL) ; \
|
||||||
|
@ -170,6 +175,7 @@ float_hash(v)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
fractpart = frexp(fractpart, &expo);
|
fractpart = frexp(fractpart, &expo);
|
||||||
|
fractpart = fractpart*4294967296.0; /* 2**32 */
|
||||||
x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
|
x = (long) (intpart + fractpart) ^ expo; /* Rather arbitrary */
|
||||||
}
|
}
|
||||||
if (x == -1)
|
if (x == -1)
|
||||||
|
|
|
@ -426,7 +426,7 @@ int_int(v)
|
||||||
intobject *v;
|
intobject *v;
|
||||||
{
|
{
|
||||||
INCREF(v);
|
INCREF(v);
|
||||||
return v;
|
return (object *)v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static object *
|
static object *
|
||||||
|
@ -512,5 +512,5 @@ typeobject Inttype = {
|
||||||
&int_as_number, /*tp_as_number*/
|
&int_as_number, /*tp_as_number*/
|
||||||
0, /*tp_as_sequence*/
|
0, /*tp_as_sequence*/
|
||||||
0, /*tp_as_mapping*/
|
0, /*tp_as_mapping*/
|
||||||
&int_hash, /*tp_hash*/
|
int_hash, /*tp_hash*/
|
||||||
};
|
};
|
||||||
|
|
|
@ -125,9 +125,8 @@ save_thread()
|
||||||
release_lock(interpreter_lock);
|
release_lock(interpreter_lock);
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
else
|
|
||||||
return NULL;
|
|
||||||
#endif
|
#endif
|
||||||
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue