Commit e72b1ccd authored by Marc G. Fournier's avatar Marc G. Fournier

Add test for union semun to configure

Remove references to NEED_UNION_SEMUN from include/config.h.in and
from include/storage/ipc.h, replacing it with a single HAVE_UNION_SEMUN
parent 321d42c6
This diff is collapsed.
...@@ -133,8 +133,18 @@ AC_HEADER_TIME ...@@ -133,8 +133,18 @@ AC_HEADER_TIME
AC_STRUCT_TM AC_STRUCT_TM
dnl Check for any "odd" conditions dnl Check for any "odd" conditions
AC_MSG_CHECKING(for int timezone)
AC_TRY_LINK([#include <time.h>], AC_TRY_LINK([#include <time.h>],
[int res = timezone / 60; ], AC_DEFINE(HAVE_INT_TIMEZONE)) [int res = timezone / 60; ],
[AC_DEFINE(HAVE_INT_TIMEZONE), AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
AC_MSG_CHECKING(for union semun)
AC_TRY_LINK([#include <sys/types.h>
#include <sys/sem.h>],
[union semun semun;],
[AC_DEFINE(HAVE_UNION_SEMUN) AC_MSG_RESULT(yes)],
AC_MSG_RESULT(no))
dnl Checks for library functions. dnl Checks for library functions.
AC_PROG_GCC_TRADITIONAL AC_PROG_GCC_TRADITIONAL
......
...@@ -71,6 +71,9 @@ ...@@ -71,6 +71,9 @@
/* Set to 1 if you have libhistory.a */ /* Set to 1 if you have libhistory.a */
#undef HAVE_LIBHISTORY #undef HAVE_LIBHISTORY
/* Set to 1 if you have union semun */
#undef HAVE_UNION_SEMUN
/* /*
* Code below this point should not require changes * Code below this point should not require changes
*/ */
...@@ -78,7 +81,6 @@ ...@@ -78,7 +81,6 @@
#if defined(aix) #if defined(aix)
# define CLASS_CONFLICT # define CLASS_CONFLICT
# define DISABLE_XOPEN_NLS # define DISABLE_XOPEN_NLS
# define NEED_UNION_SEMUN
# define HAVE_SYS_SELECT_H # define HAVE_SYS_SELECT_H
# define HAVE_ANSI_CPP # define HAVE_ANSI_CPP
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
...@@ -90,7 +92,6 @@ ...@@ -90,7 +92,6 @@
# define USE_POSIX_SIGNALS # define USE_POSIX_SIGNALS
# define DISABLE_XOPEN_NLS # define DISABLE_XOPEN_NLS
# define HAS_LONG_LONG # define HAS_LONG_LONG
# define NEED_UNION_SEMUN
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
# include <sys/mman.h> /* for msemaphore */ # include <sys/mman.h> /* for msemaphore */
typedef msemaphore slock_t; typedef msemaphore slock_t;
...@@ -113,9 +114,6 @@ ...@@ -113,9 +114,6 @@
# if defined(sparc) # if defined(sparc)
# define NEED_SPARC_TAS_ASM # define NEED_SPARC_TAS_ASM
# endif # endif
# if defined(PRE_BSDI_2_1)
# define NEED_UNION_SEMUN
# endif
# define USE_POSIX_TIME # define USE_POSIX_TIME
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
...@@ -124,14 +122,12 @@ ...@@ -124,14 +122,12 @@
#if defined(dgux) #if defined(dgux)
# define LINUX_ELF # define LINUX_ELF
# define NEED_UNION_SEMUN
# define USE_POSIX_SIGNALS # define USE_POSIX_SIGNALS
#endif #endif
#if defined(hpux) #if defined(hpux)
# define JMP_BUF # define JMP_BUF
# define USE_POSIX_TIME # define USE_POSIX_TIME
# define NEED_UNION_SEMUN
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
typedef struct { int sem[4]; } slock_t; typedef struct { int sem[4]; } slock_t;
#endif #endif
...@@ -141,7 +137,6 @@ ...@@ -141,7 +137,6 @@
# define USE_POSIX_SIGNALS # define USE_POSIX_SIGNALS
# define NEED_RUSAGE # define NEED_RUSAGE
# define NO_EMPTY_STMTS # define NO_EMPTY_STMTS
# define NEED_UNION_SEMUN
# define SYSV_DIRENT # define SYSV_DIRENT
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
...@@ -195,17 +190,12 @@ ...@@ -195,17 +190,12 @@
typedef struct mutex slock_t; typedef struct mutex slock_t;
#endif #endif
#if defined(sequent)
# define NEED_UNION_SEMUN
#endif
#if defined(sparc_solaris) #if defined(sparc_solaris)
# define USE_POSIX_TIME # define USE_POSIX_TIME
# define USE_POSIX_SIGNALS # define USE_POSIX_SIGNALS
# define NEED_RUSAGE # define NEED_RUSAGE
# define NO_EMPTY_STMTS # define NO_EMPTY_STMTS
# define USE_POSIX_TIME # define USE_POSIX_TIME
# define NEED_UNION_SEMUN
# define SYSV_DIRENT # define SYSV_DIRENT
# define HAS_TEST_AND_SET # define HAS_TEST_AND_SET
typedef unsigned char slock_t; typedef unsigned char slock_t;
...@@ -221,7 +211,6 @@ typedef unsigned char slock_t; ...@@ -221,7 +211,6 @@ typedef unsigned char slock_t;
# define USE_POSIX_SIGNALS # define USE_POSIX_SIGNALS
# define NEED_RUSAGE # define NEED_RUSAGE
# define NO_EMPTY_STMTS # define NO_EMPTY_STMTS
# define NEED_UNION_SEMUN
# define SYSV_DIRENT # define SYSV_DIRENT
#endif #endif
...@@ -231,7 +220,6 @@ typedef unsigned char slock_t; ...@@ -231,7 +220,6 @@ typedef unsigned char slock_t;
# define NO_UNISTD_H # define NO_UNISTD_H
# define USES_WINSOCK # define USES_WINSOCK
# define NOFILE 100 # define NOFILE 100
# define NEED_UNION_SEMUN
# ifndef MAXPATHLEN # ifndef MAXPATHLEN
# define MAXPATHLEN 250 # define MAXPATHLEN 250
# endif # endif
...@@ -239,7 +227,6 @@ typedef unsigned char slock_t; ...@@ -239,7 +227,6 @@ typedef unsigned char slock_t;
#if defined(ultrix4) #if defined(ultrix4)
# define USE_POSIX_TIME # define USE_POSIX_TIME
# define NEED_UNION_SEMUN
# define NEED_STRDUP # define NEED_STRDUP
#endif #endif
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
* *
* Copyright (c) 1994, Regents of the University of California * Copyright (c) 1994, Regents of the University of California
* *
* $Id: ipc.h,v 1.13 1997/01/26 20:15:26 momjian Exp $ * $Id: ipc.h,v 1.14 1997/02/06 05:30:50 scrappy Exp $
* *
* NOTES * NOTES
* This file is very architecture-specific. This stuff should actually * This file is very architecture-specific. This stuff should actually
...@@ -43,7 +43,7 @@ extern int S_LOCK_FREE(slock_t *lock); ...@@ -43,7 +43,7 @@ extern int S_LOCK_FREE(slock_t *lock);
#endif /* HAS_TEST_AND_SET */ #endif /* HAS_TEST_AND_SET */
#ifdef NEED_UNION_SEMUN #ifndef HAVE_UNION_SEMUN
union semun { union semun {
int val; int val;
struct semid_ds *buf; struct semid_ds *buf;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment