changeset 18362:29b2221982b3

Add a check for sysi86() on Solaris systems, solving a build failure on Solaris 10 x86 to avoid using a local declaration that is no longer compatible. patch by "Derek E. Lewis", dlewis $$@$$ solnetworks %%.%% net
author diego
date Sun, 30 Apr 2006 21:17:30 +0000
parents e20114911d05
children 33951d7515df
files configure loader/ldt_keeper.c
diffstat 2 files changed, 22 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/configure	Sun Apr 30 20:36:13 2006 +0000
+++ b/configure	Sun Apr 30 21:17:30 2006 +0000
@@ -3380,6 +3380,23 @@
 echores "$_setenv"
 
 
+if sunos; then
+echocheck "sysi86()"
+cat > $TMPC << EOF
+#include <sys/sysi86.h>
+int main (void) { sysi86(0); return 0; }
+EOF
+_sysi86=no
+cc_check && _sysi86=yes
+if test "$_sysi86" = yes ; then
+  _def_sysi86='#define HAVE_SYSI86 1'
+else
+  _def_sysi86='#undef HAVE_SYSI86'
+fi
+echores "$_sysi86"
+fi
+
+
 echocheck "sys/sysinfo.h"
 cat > $TMPC << EOF
 #include <sys/sysinfo.h>
@@ -7701,6 +7718,9 @@
 int setenv(const char *name, const char *val, int overwrite);
 #endif
 
+/* Define this if your system has sysi86 */
+$_def_sysi86
+
 /* Define this if your system has pthreads */
 $_def_pthreads
 
--- a/loader/ldt_keeper.c	Sun Apr 30 20:36:13 2006 +0000
+++ b/loader/ldt_keeper.c	Sun Apr 30 21:17:30 2006 +0000
@@ -60,6 +60,7 @@
 #include <sys/sysi86.h>
 
 /* solaris x86: add missing prototype for sysi86() */
+#ifdef HAVE_SYSI86
 #ifdef  __cplusplus
 extern "C" {
 #endif
@@ -67,6 +68,7 @@
 #ifdef  __cplusplus
 }
 #endif
+#endif
 
 #ifndef NUMSYSLDTS             /* SunOS 2.5.1 does not define NUMSYSLDTS */
 #define NUMSYSLDTS     6       /* Let's hope the SunOS 5.8 value is OK */