compile under sun's cc.

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@165 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2001-09-24 18:07:16 +00:00
parent 34010ba45a
commit 2eb822797e
17 changed files with 40 additions and 35 deletions

View File

@ -367,7 +367,7 @@ void cputime_interval(Int *now,Int *interval)
#endif
#if defined(__sun__) && defined(__svr4__)
#if defined(__sun__) && (defined(__svr4__) || defined(__SVR4))
#if HAVE_LIMITS_H
#include <limits.h>
@ -812,7 +812,7 @@ p_srandom (void)
STATIC_PROTO (void InitSignals, (void));
#if defined(__svr4__)
#if (defined(__svr4__) || defined(__SVR4))
#if HAVE_SIGINFO_H
#include <siginfo.h>
@ -1200,7 +1200,7 @@ ProcessSIGINT(void)
that might be
*/
static RETSIGTYPE
#if defined(__svr4__)
#if (defined(__svr4__) || defined(__SVR4))
HandleSIGINT (int sig, siginfo_t *x, ucontext_t *y)
#else
HandleSIGINT (int sig)
@ -1238,7 +1238,7 @@ HandleSIGINT (int sig)
#if !defined(_WIN32)
/* this routine is called if the system activated the alarm */
static RETSIGTYPE
#if defined(__svr4__)
#if (defined(__svr4__) || defined(__SVR4))
HandleALRM (int s, siginfo_t *x, ucontext_t *y)
#else
HandleALRM(int s)
@ -1259,7 +1259,7 @@ HandleALRM(int s)
#if !defined(LIGHT) && !_MSC_VER && !defined(__MINGW32__) && !defined(LIGHT)
static RETSIGTYPE
#if defined(__svr4__)
#if (defined(__svr4__) || defined(__SVR4))
ReceiveSignal (int s, siginfo_t *x, ucontext_t *y)
#else
ReceiveSignal (int s)

View File

@ -47,9 +47,10 @@ rational_tree_loop(CELL *pt0, CELL *pt0_end, CELL **to_visit0)
loop:
while (pt0 < pt0_end) {
register CELL *ptd0 = ++pt0;
register CELL *ptd0;
register CELL d0;
ptd0 = ++pt0;
pt0 = ptd0;
d0 = *ptd0;
deref_head(d0, rtree_loop_unk);
@ -139,11 +140,13 @@ OCUnify_complex(register CELL *pt0, register CELL *pt0_end,
)
{
register CELL **to_visit = (CELL **) H;
register CELL **to_visit;
#if SHADOW_HB
register CELL *HBREG = HB;
register CELL *HBREG;
HBREG = HB;
#endif
to_visit = (CELL **) H;
loop:
while (pt0 < pt0_end) {
register CELL *ptd0 = ++pt0;

View File

@ -53,9 +53,9 @@
#define LOAD_DL 1
#endif
#ifdef sparc
#if defined(sparc) || defined(__sparc)
#undef NO_DYN
#ifndef __svr4__
#if (!defined(__svr4__) && !defined(__SVR4))
#define A_OUT 1
#else
#ifdef SIMICS
@ -66,7 +66,7 @@
#endif
#endif
#ifdef __svr4__
#if (defined(__svr4__) || defined(__SVR4))
#ifndef SIMICS
#ifdef NO_DYN
#undef NO_DYN

View File

@ -10,7 +10,7 @@
* File: Regs.h *
* mods: *
* comments: YAP abstract machine registers *
* version: $Id: Regs.h,v 1.4 2001-06-27 15:46:26 vsc Exp $ *
* version: $Id: Regs.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
@ -25,7 +25,7 @@
#endif
#endif
#ifdef sparc
#if defined(sparc) || defined(__sparc)
#undef PUSH_REGS
#undef PUSH_X
#endif

View File

@ -28,7 +28,7 @@ static char SccsId[] = "%W% %G%";
*/
#ifdef __GNUC__
#ifdef sparc
#if defined(sparc) || defined(__sparc)
#define SHADOW_P 1
#define SHADOW_Y 1
#define SHADOW_S 1

View File

@ -102,7 +102,7 @@ void STD_PROTO(YAP_InitHeap, (void *));
#elif USE_SBRK
#ifdef __svr4__
#if (defined(__svr4__) || defined(__SVR4))
#include <unistd.h>
#elif sun
#include <sys/types.h>

View File

@ -371,7 +371,9 @@ Int unify(Term t0, Term t1)
return(TRUE);
} else {
while(TR != TR0) {
CELL *p = (CELL *)TrailTerm(--TR);
CELL *p;
--TR;
p = (CELL *)TrailTerm(TR);
RESET_VARIABLE(p);
}
return(FALSE);

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Tag Scheme for machines with 24 bits adresses (m68000) *
* version: $Id: Tags_24bits.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: Tags_24bits.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
/* Version for 24 bit addresses (68000)

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32LowTag.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: Tags_32LowTag.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
#define TAG_LOW_BITS_32 1

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32Ops.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: Tags_32Ops.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
/*

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32bits.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: Tags_32bits.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
/* Original version for 32 bit addresses machines,

View File

@ -18,7 +18,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_64bits.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: Tags_64bits.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
#define TAG_64BITS 1

View File

@ -17,7 +17,7 @@
* File: TermExt.h *
* mods: *
* comments: Extensions to standard terms for YAP *
* version: $Id: TermExt.h,v 1.4 2001-08-09 14:01:19 vsc Exp $ *
* version: $Id: TermExt.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
#if USE_OFFSETS

View File

@ -17,7 +17,7 @@
* File: Yap.h.m4 *
* mods: *
* comments: main header file for YAP *
* version: $Id: Yap.h,v 1.4 2001-08-09 14:01:20 vsc Exp $ *
* version: $Id: Yap.h,v 1.5 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
#include "config.h"
@ -171,7 +171,7 @@
/* */ typedef unsigned long int UInt;
#else
error Yap require integer types of the same size as a pointer
# error Yap require integer types of the same size as a pointer
#endif
#if SIZEOF_SHORT_INT==2
@ -179,7 +179,7 @@
/* */ typedef unsigned short int UShort;
#else
error Yap requires integer types half the size of a pointer
# error Yap requires integer types half the size of a pointer
#endif
#elif SIZEOF_INT_P==8
@ -197,7 +197,7 @@
/* */ typedef unsigned long long int UInt;
# else
error Yap requires integer types of the same size as a pointer
# error Yap requires integer types of the same size as a pointer
# endif
# if SIZEOF_SHORT_INT==4
@ -209,12 +209,12 @@
/* */ typedef short int UShort;
# else
error Yap requires integer types half the size of a pointer
# error Yap requires integer types half the size of a pointer
# endif
#else
error Yap requires pointers of size 4 or 8
# error Yap requires pointers of size 4 or 8
#endif

View File

@ -11,7 +11,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_32Ops.h.m4,v 1.1.1.1 2001-04-09 19:53:46 vsc Exp $ *
* version: $Id: Tags_32Ops.h.m4,v 1.2 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
/*
@ -71,7 +71,7 @@ are now 1 in compound terms and structures.
This allows optimisation of switch_list
*/
#if defined(i386) || defined(sparc) || defined(_POWER)
#if defined(i386) || defined(sparc) || defined(_POWER) || defined(__sparc)
#define UNIQUE_TAG_FOR_PAIRS 1
#endif

View File

@ -11,7 +11,7 @@
* Last rev: December 90 *
* mods: *
* comments: Original Tag Scheme for machines with 32 bits adresses *
* version: $Id: Tags_64ops.h.m4,v 1.1.1.1 2001-04-09 19:53:46 vsc Exp $ *
* version: $Id: Tags_64ops.h.m4,v 1.2 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
/*
@ -69,7 +69,7 @@ are now 1 in compound terms and structures.
This allows optimisation of switch_list
*/
#if defined(i386) || defined(sparc) || defined(_POWER)
#if defined(i386) || defined(sparc) || defined(_POWER) || defined(__sparc)
#define UNIQUE_TAG_FOR_PAIRS 1
#endif

View File

@ -10,7 +10,7 @@
* File: Yap.h.m4 *
* mods: *
* comments: main header file for YAP *
* version: $Id: Yap.h.m4,v 1.11 2001-09-24 14:06:06 vsc Exp $ *
* version: $Id: Yap.h.m4,v 1.12 2001-09-24 18:07:16 vsc Exp $ *
*************************************************************************/
#include "config.h"
@ -315,7 +315,7 @@ typedef CELL Term;
#ifdef i386
#include <x86_locks.h>
#endif
#ifdef sparc
#if defined(sparc) || defined(__sparc)
#include <sparc_locks.h>
#endif
#ifdef mips
@ -567,7 +567,7 @@ and RefOfTerm(t) : Term -> DBRef = ...
incompatible with the high tag scheme. Linux-ELF also does not like
if you place things in the lower addresses (power to the libc people).
*/
#if (defined(_AIX) || defined(_WIN32) || defined(sparc) || defined(mips) || defined(__FreeBSD__) || defined(_POWER) || defined(IN_SECOND_QUADRANT)) && !defined(TABLING)
#if (defined(_AIX) || defined(_WIN32) || defined(sparc) || defined(__sparc) || defined(mips) || defined(__FreeBSD__) || defined(_POWER) || defined(IN_SECOND_QUADRANT)) && !defined(TABLING)
#define USE_LOW32_TAGS 1
#endif