From: andre Date: Mon, 7 Jul 1997 17:21:24 +0000 (+0000) Subject: [project @ 1997-07-07 17:21:23 by andre] X-Git-Tag: Approximately_1000_patches_recorded~248 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=66982e0f7224becdb8f70ada0ec71b758e393edd;p=ghc-hetmet.git [project @ 1997-07-07 17:21:23 by andre] RS6000 prof/conc patches --- diff --git a/ghc/includes/COptWraps.lh b/ghc/includes/COptWraps.lh index 27c862f..409693b 100644 --- a/ghc/includes/COptWraps.lh +++ b/ghc/includes/COptWraps.lh @@ -576,6 +576,13 @@ gets whatever it's after. #define WRAPPER_NAME(f) /* nothing */ +#define SET_RETADDR(loc) \ + __asm__ volatile ( \ + "mflr 0\n" \ + "\tst 0,%0" \ + :"=m" (loc) :: "0"); +/* __asm__ volatile ("st %%r0, %0" : "=m" ((void *)(loc))); */ + #define WRAPPER_SETUP(f,ignore1,ignore2) SaveAllStgContext(); /* we have to make sure the STG registers are restored. diff --git a/ghc/includes/stgdefs.h b/ghc/includes/stgdefs.h index 1b1f9af..50eb657 100644 --- a/ghc/includes/stgdefs.h +++ b/ghc/includes/stgdefs.h @@ -44,12 +44,20 @@ void _stgAssert PROTO((char *, unsigned int)); #ifdef nextstep3_TARGET_OS #define _NEXT_SOURCE #endif - + +#ifdef aix_TARGET_OS +/* for fd_set */ +#include +#endif + #ifdef NON_POSIX_SOURCE #undef _POSIX_SOURCE #undef _POSIX_C_SOURCE #else +# ifndef aix_TARGET_OS +/* already defined on aix */ #define _POSIX_SOURCE 1 +# endif #ifndef irix_TARGET_OS #define _POSIX_C_SOURCE 199301L #else