diff --git a/ghc/interpreter/interface.c b/ghc/interpreter/interface.c index 48846700389125e4e48cb7a84e1302f85619e3d3..ce57edca16b382df92b676ca2b403fbfc9378106 100644 --- a/ghc/interpreter/interface.c +++ b/ghc/interpreter/interface.c @@ -7,8 +7,8 @@ * Hugs version 1.4, December 1997 * * $RCSfile: interface.c,v $ - * $Revision: 1.50 $ - * $Date: 2000/04/10 15:24:26 $ + * $Revision: 1.51 $ + * $Date: 2000/04/11 16:49:20 $ * ------------------------------------------------------------------------*/ #include "hugsbasictypes.h" @@ -2609,7 +2609,6 @@ Type type; { SymX(lseek) \ SymX(write) \ Sym(getrusage) \ - Sym(gettimeofday) \ SymX(realloc) \ SymX(getcwd) \ SymX(free) \ @@ -2676,7 +2675,10 @@ Type type; { SymX(gmtime) \ Sym(setitimer) \ Sym(chmod) \ + Sym(gettimeofday) \ +#define EXTERN_SYMS_solaris2 \ + SymX(gettimeofday) \ #if defined(linux_TARGET_OS) @@ -2717,7 +2719,6 @@ OSym rtsTab[] #undef SymX -void init_stack; /* A kludge to assist Win32 debugging. */ diff --git a/ghc/interpreter/object.c b/ghc/interpreter/object.c index 4da4e062a60f65cd1a7d6d4b885441be8907fdfe..762b3827bd14bf773a68b6eeddf2da2eb271949f 100644 --- a/ghc/interpreter/object.c +++ b/ghc/interpreter/object.c @@ -1371,8 +1371,10 @@ static int ocResolve_ELF ( ObjectCode* oc, int verb ) (void*)P, (void*)S, (void*)A ); */ switch (ELF32_R_TYPE(info)) { +# if defined(linux_TARGET_OS) case R_386_32: *pP = S + A; break; case R_386_PC32: *pP = S + A - P; break; +# endif default: fprintf(stderr, "unhandled ELF relocation type %d\n", ELF32_R_TYPE(info)); diff --git a/ghc/rts/ForeignCall.c b/ghc/rts/ForeignCall.c index 182853e72f322f3c595a5c83e395e63bd2b59ac9..38158ce4941ff12ef30021ae341232c75cbcbc8d 100644 --- a/ghc/rts/ForeignCall.c +++ b/ghc/rts/ForeignCall.c @@ -1,6 +1,6 @@ /* ----------------------------------------------------------------------------- - * $Id: ForeignCall.c,v 1.13 2000/03/02 10:32:17 sewardj Exp $ + * $Id: ForeignCall.c,v 1.14 2000/04/11 16:49:20 sewardj Exp $ * * (c) The GHC Team 1994-1999. * @@ -178,7 +178,7 @@ static void universal_call_c_generic unsigned int *p = (unsigned int*) args; #define ARG(n) (p[n*2]) -#define CMP(str) ((n_args + 1 == strlen(str)) && \ +#define CMP(str) ((n_args + 1 == (int)strlen(str)) && \ (!strncmp(str,argstr,n_args + 1))) #define CALL(retType,callTypes,callVals) \ @@ -248,7 +248,7 @@ int ccall ( CFunDescriptor* d, return 1; /* unlikely, but ... */ p = (unsigned int*) &arg_vec[1]; - for (i = 0; i < d->num_args; i++) { + for (i = 0; i < (int)(d->num_args); i++) { switch (d->arg_tys[i]) { case INT_REP: @@ -686,7 +686,7 @@ StgAddr createAdjThunk ( StgStablePtr stableptr, createAdjThunk_x86 ( stableptr, typestr, callconv ); #else 0; - #warn foreign export not implemented on this architecture +#warning foreign export not implemented on this architecture #endif } diff --git a/ghc/rts/Main.c b/ghc/rts/Main.c index a90556eae29ce29a00b410bb66f16e78b15d4dac..564e74f259544ddcc7d39aa456a9953de697bf6b 100644 --- a/ghc/rts/Main.c +++ b/ghc/rts/Main.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: Main.c,v 1.22 2000/04/03 16:26:01 simonmar Exp $ + * $Id: Main.c,v 1.23 2000/04/11 16:49:20 sewardj Exp $ * * (c) The GHC Team 1998-2000 * @@ -43,7 +43,7 @@ EXTFUN(__init_PrelMain); /* Hack: we assume that we're building a batch-mode system unless * INTERPRETER is set */ -# ifndef INTERPRETER /* Hack */ +#ifndef INTERPRETER /* Hack */ int main(int argc, char *argv[]) { int exit_status;