From 66982e0f7224becdb8f70ada0ec71b758e393edd Mon Sep 17 00:00:00 2001 From: andre Date: Mon, 7 Jul 1997 17:21:24 +0000 Subject: [PATCH] [project @ 1997-07-07 17:21:23 by andre] RS6000 prof/conc patches --- ghc/includes/COptWraps.lh | 7 +++++++ ghc/includes/stgdefs.h | 10 +++++++++- 2 files changed, 16 insertions(+), 1 deletion(-) 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 -- 1.7.10.4