httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jim Jagielski <...@jaguNET.com>
Subject Re: cvs commit: apache-2.0/src acinclude.m4
Date Thu, 13 Apr 2000 13:22:02 GMT
martin@locus.apache.org wrote:
> 
> martin      00/04/13 04:03:20
> 
>   Modified:    src/lib/apr/shmem/unix/mm aclocal.m4
>                src      acinclude.m4
>   Log:
>   On all the systems I could get hold of (Solaris, ReliantUNIX, BS2000, SINIX),
>   SHM_R was always 0400, never 0x400. My assumption is that is usually (always) is.

Good catch!! On every system I can see, this is the case as well
(including FreeBSD, A/UX, AIX and others).

I think the _default_ should be octal so maybe we should reverse that
logic. Then again, I don't know of any that we can use for the first case:


  case `uname -s` in
    UNKNOWN-STUPID-BROKEN ) 
      AC_DEFINE(SHM_R, 0x400, [ ])
      AC_DEFINE(SHM_W, 0x200, [ ])
      ;;
    *)
      AC_DEFINE(SHM_R, 0400, [ ])
      AC_DEFINE(SHM_W, 0200, [ ])
      ;;
  esac

>   
>   Feel free to change it to an OS test like this (if your OS differs):
>   case `uname -s` in
>     SunOS | POSIX-BC | SINIX-* | ReliantUNIX-* ) # BS2000
>       AC_DEFINE(SHM_R, 0400, [ ])
>       AC_DEFINE(SHM_W, 0200, [ ])
>       ;;
>     *)
>       AC_DEFINE(SHM_R, 0x400, [ ])
>       AC_DEFINE(SHM_W, 0x200, [ ])
>       ;;
>   esac
>   
>   Revision  Changes    Path
>   1.3       +6 -0      apache-2.0/src/lib/apr/shmem/unix/mm/aclocal.m4
>   
>   Index: aclocal.m4
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/lib/apr/shmem/unix/mm/aclocal.m4,v
>   retrieving revision 1.2
>   retrieving revision 1.3
>   diff -u -u -r1.2 -r1.3
>   --- aclocal.m4	1999/09/27 07:42:00	1.2
>   +++ aclocal.m4	2000/04/13 11:03:20	1.3
>   @@ -236,7 +236,13 @@
>    #endif
>    #ifdef TEST_SHMGET
>    #include <sys/ipc.h>
>   +#ifndef _OSD_POSIX
>    #include <sys/shm.h>
>   +#else
>   +#define _KMEMUSER 1 /* BS2000 needs this to enable SHM_[RW] */
>   +#include <sys/shm.h>
>   +#undef  _KMEMUSER
>   +#endif
>    #endif
>    #if !defined(MAP_FAILED)
>    #define MAP_FAILED ((void *)-1)
>   
>   
>   
>   1.22      +8 -2      apache-2.0/src/acinclude.m4
>   
>   Index: acinclude.m4
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/acinclude.m4,v
>   retrieving revision 1.21
>   retrieving revision 1.22
>   diff -u -u -r1.21 -r1.22
>   --- acinclude.m4	2000/04/07 02:45:11	1.21
>   +++ acinclude.m4	2000/04/13 11:03:20	1.22
>   @@ -181,7 +181,13 @@
>      AC_TRY_COMPILE([
>    #include <sys/types.h>
>    #include <sys/ipc.h>
>   +#ifndef _OSD_POSIX
>    #include <sys/shm.h>
>   +#else
>   +#define _KMEMUSER   /* BS2000 needs this to enable SHM_[RW] */
>   +#include <sys/shm.h>
>   +#undef  _KMEMUSER
>   +#endif
>    ],[
>      int x = SHM_R | SHM_W;
>    ],[
>   @@ -190,8 +196,8 @@
>      ac_cv_shm_rw=no
>    ])])
>      if test "$ac_cv_shm_rw" = "no"; then
>   -    AC_DEFINE(SHM_R, 0x400, [ ])
>   -    AC_DEFINE(SHM_W, 0x200, [ ])
>   +    AC_DEFINE(SHM_R, 0400, [ ])
>   +    AC_DEFINE(SHM_W, 0200, [ ])
>      fi
>    ])
>    
>   
>   
>   
> 


-- 
===========================================================================
   Jim Jagielski   [|]   jim@jaguNET.com   [|]   http://www.jaguNET.com/
                "Are you suggesting coconuts migrate??"

Mime
View raw message