From 76aa5ff2186ee28717a25b8d6947046ac14d8770 Mon Sep 17 00:00:00 2001 From: Derrick Brashear Date: Thu, 22 Aug 2002 18:02:03 +0000 Subject: [PATCH] sunos-support-cleanup-20020822 some things want ucontext.h. leave it there --- acinclude.m4 | 2 +- src/config/param.ia64_linux24.h | 2 +- src/config/param.ia64_linux24_usr.h | 2 +- src/lwp/lwp.h | 4 ++-- src/lwp/preempt.c | 3 +++ src/lwp/process.c | 2 +- 6 files changed, 9 insertions(+), 6 deletions(-) diff --git a/acinclude.m4 b/acinclude.m4 index 2b55436876..7a3c03c4f3 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -555,7 +555,7 @@ AC_CHECK_HEADERS(netinet/in.h netdb.h sys/fcntl.h sys/mnttab.h sys/mntent.h) AC_CHECK_HEADERS(mntent.h sys/vfs.h sys/param.h sys/fs_types.h) AC_CHECK_HEADERS(sys/mount.h strings.h termios.h signal.h) AC_CHECK_HEADERS(windows.h malloc.h winsock2.h direct.h io.h) -AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h) +AC_CHECK_HEADERS(security/pam_modules.h siad.h usersec.h ucontext.h) AC_CHECK_FUNCS(utimes random srandom getdtablesize snprintf re_comp re_exec) AC_CHECK_FUNCS(setprogname getprogname sigaction) diff --git a/src/config/param.ia64_linux24.h b/src/config/param.ia64_linux24.h index 63e5f45a84..58d31d9a8b 100644 --- a/src/config/param.ia64_linux24.h +++ b/src/config/param.ia64_linux24.h @@ -75,6 +75,6 @@ #endif #endif /* KERNEL */ -#define HAVE_UCONTEXT_H /* should be in afsconfig.h */ +#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* _PARAM_IA64_LINUX20_H_ */ diff --git a/src/config/param.ia64_linux24_usr.h b/src/config/param.ia64_linux24_usr.h index a15d41e0ac..377971baf1 100644 --- a/src/config/param.ia64_linux24_usr.h +++ b/src/config/param.ia64_linux24_usr.h @@ -54,6 +54,6 @@ #define CMSERVERPREF #endif -#define HAVE_UCONTEXT_H /* should be in afsconfig.h */ +#define USE_UCONTEXT /* should be in afsconfig.h */ #endif /* AFS_PARAM_H */ diff --git a/src/lwp/lwp.h b/src/lwp/lwp.h index 9308239916..89499e7a88 100644 --- a/src/lwp/lwp.h +++ b/src/lwp/lwp.h @@ -20,7 +20,7 @@ #if !defined(KERNEL) && !defined(_KMEMUSER) && !defined(AFS_PTHREAD_ENV) #include -#ifdef HAVE_UCONTEXT_H +#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) #include #else #include @@ -195,7 +195,7 @@ typedef struct lwp_pcb { #else struct lwp_context { /* saved context for dispatcher */ char *topstack; /* ptr to top of process stack */ -#ifdef HAVE_UCONTEXT_H +#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) ucontext_t ucontext; int state; #else /* !HAVE_UCONTEXT_H */ diff --git a/src/lwp/preempt.c b/src/lwp/preempt.c index 6cea665fb8..b51bff9848 100644 --- a/src/lwp/preempt.c +++ b/src/lwp/preempt.c @@ -40,6 +40,9 @@ int PRE_EndPreempt() #else #include #include +#ifdef HAVE_UCONTEXT_H +#include +#endif #if defined(AFS_OSF_ENV) || defined(AFS_S390_LINUX20_ENV) int PRE_Block = 0; /* used in lwp.c and process.s */ diff --git a/src/lwp/process.c b/src/lwp/process.c index 71eebdf523..9044b322c6 100644 --- a/src/lwp/process.c +++ b/src/lwp/process.c @@ -27,7 +27,7 @@ extern int PRE_Block; /* used in lwp.c and process.s */ extern char PRE_Block; /* used in lwp.c and process.s */ #endif -#ifdef HAVE_UCONTEXT_H +#if defined(USE_UCONTEXT) && defined(HAVE_UCONTEXT_H) afs_int32 savecontext(ep, savearea, newsp)