You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@apr.apache.org by Cliff Woolley <jw...@virginia.edu> on 2002/06/12 18:59:11 UTC

APR_HAVE_ vs APR_HAS_ (was Re: APR doubts)

On Wed, 12 Jun 2002, Cliff Woolley wrote:

> There are a *few* cases where we use HAVE where we should be using HAS,
> and those ought to be cleaned up.  But we're mostly consistent.  :)

Responding to this message caused me to take a second and actually go look
at how consistently we're using this naming convention.  We're *very*
close to consistent, I think.  There are just a few cases where I believe
it should be APR_HAS and instead it's APR_HAVE.  Here's a stub of a patch
that illustrates the ones I think should be changed.  Obviously a real
patch would be much much bigger, in that configure.in and a million
"users" of these macros would need to change.  But anyway, what do you
think of this?

--Cliff


Index: apr.h.in
===================================================================
RCS file: /home/cvs/apr/include/apr.h.in,v
retrieving revision 1.108
diff -u -d -r1.108 apr.h.in
--- apr.h.in    7 May 2002 04:12:44 -0000       1.108
+++ apr.h.in    12 Jun 2002 16:59:54 -0000
@@ -65,14 +65,6 @@
 #define APR_HAVE_TIME_H          @timeh@
 #define APR_HAVE_UNISTD_H        @unistdh@

-#define APR_HAVE_SHMEM_MMAP_TMP     @havemmaptmp@
-#define APR_HAVE_SHMEM_MMAP_SHM     @havemmapshm@
-#define APR_HAVE_SHMEM_MMAP_ZERO    @havemmapzero@
-#define APR_HAVE_SHMEM_SHMGET_ANON  @haveshmgetanon@
-#define APR_HAVE_SHMEM_SHMGET       @haveshmget@
-#define APR_HAVE_SHMEM_MMAP_ANON    @havemmapanon@
-#define APR_HAVE_SHMEM_BEOS         @havebeosarea@
-
 #define APR_USE_SHMEM_MMAP_TMP     @usemmaptmp@
 #define APR_USE_SHMEM_MMAP_SHM     @usemmapshm@
 #define APR_USE_SHMEM_MMAP_ZERO    @usemmapzero@
@@ -81,6 +73,14 @@
 #define APR_USE_SHMEM_MMAP_ANON    @usemmapanon@
 #define APR_USE_SHMEM_BEOS         @usebeosarea@

+#define APR_HAS_SHMEM_MMAP_TMP     @hasmmaptmp@
+#define APR_HAS_SHMEM_MMAP_SHM     @hasmmapshm@
+#define APR_HAS_SHMEM_MMAP_ZERO    @hasmmapzero@
+#define APR_HAS_SHMEM_SHMGET_ANON  @hasshmgetanon@
+#define APR_HAS_SHMEM_SHMGET       @hasshmget@
+#define APR_HAS_SHMEM_MMAP_ANON    @hasmmapanon@
+#define APR_HAS_SHMEM_BEOS         @hasbeosarea@
+
 #define APR_USE_FLOCK_SERIALIZE           @flockser@
 #define APR_USE_SYSVSEM_SERIALIZE         @sysvser@
 #define APR_USE_POSIXSEM_SERIALIZE        @posixser@
@@ -97,12 +97,10 @@

 #define APR_PROCESS_LOCK_IS_GLOBAL        @proclockglobal@

-#define APR_HAVE_CORKABLE_TCP   @have_corkable_tcp@
 #define APR_HAVE_GETRLIMIT      @have_getrlimit@
 #define APR_HAVE_IN_ADDR        @have_in_addr@
 #define APR_HAVE_INET_ADDR      @have_inet_addr@
 #define APR_HAVE_INET_NETWORK   @have_inet_network@
-#define APR_HAVE_IPV6           @have_ipv6@
 #define APR_HAVE_MEMMOVE        @have_memmove@
 #define APR_HAVE_SETRLIMIT      @have_setrlimit@
 #define APR_HAVE_SIGACTION      @have_sigaction@
@@ -131,6 +129,8 @@
 #endif

 /*  APR Feature Macros */
+#define APR_HAS_CORKABLE_TCP      @has_corkable_tcp@
+#define APR_HAS_IPV6              @has_ipv6@
 #define APR_HAS_SHARED_MEMORY     @sharedmem@
 #define APR_HAS_THREADS           @threads@
 #define APR_HAS_SENDFILE          @sendfile@