#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.
#ifdef nextstep3_TARGET_OS
#define _NEXT_SOURCE
#endif
-
+
+#ifdef aix_TARGET_OS
+/* for fd_set */
+#include <sys/select.h>
+#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