You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by rb...@locus.apache.org on 2000/06/27 23:35:30 UTC

cvs commit: apache-2.0/src/lib/apr/include apr.h.in apr_general.h

rbb         00/06/27 14:35:30

  Modified:    src      configure.in
               src/include ap_config.h
               src/lib/apr configure.in
               src/lib/apr/include apr.h.in apr_general.h
  Log:
  Move the checks for bcopy and memmove down to APR.  APR now defines memmove
  and bzero on platforms that do not natively support them.
  
  Revision  Changes    Path
  1.67      +0 -2      apache-2.0/src/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/configure.in,v
  retrieving revision 1.66
  retrieving revision 1.67
  diff -u -r1.66 -r1.67
  --- configure.in	2000/06/27 21:28:31	1.66
  +++ configure.in	2000/06/27 21:35:25	1.67
  @@ -95,8 +95,6 @@
   
   AC_CHECK_FUNCS( \
   initgroups \
  -memmove \
  -bzero \
   )
   
   AC_CHECK_LIB(nsl, gethostbyname)
  
  
  
  1.39      +0 -12     apache-2.0/src/include/ap_config.h
  
  Index: ap_config.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/include/ap_config.h,v
  retrieving revision 1.38
  retrieving revision 1.39
  diff -u -r1.38 -r1.39
  --- ap_config.h	2000/06/22 22:49:49	1.38
  +++ ap_config.h	2000/06/27 21:35:27	1.39
  @@ -109,18 +109,6 @@
   #define ap_sigwait(a,b) sigwait((a),(b))
   #endif
   
  -/*
  - * String and memory functions
  - */
  -
  -#ifndef HAVE_MEMMOVE
  -#define memmove(a,b,c) bcopy(b,a,c)
  -#endif
  -
  -#ifndef HAVE_BZERO
  -#define bzero(a,b) memset(a,0,b)
  -#endif
  -
   /* TODO - We need to put OS detection back to make all the following work */
   
   #if defined(SUNOS4) || defined(IRIX) || defined(NEXT) || defined(AUX3) \
  
  
  
  1.123     +5 -0      apache-2.0/src/lib/apr/configure.in
  
  Index: configure.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/configure.in,v
  retrieving revision 1.122
  retrieving revision 1.123
  diff -u -r1.122 -r1.123
  --- configure.in	2000/06/27 20:06:19	1.122
  +++ configure.in	2000/06/27 21:35:29	1.123
  @@ -219,6 +219,9 @@
       mmap="1"
   fi
   AC_CHECK_FUNCS(hstrerror)
  +AC_CHECK_FUNCS(memmove, [ have_memmove="1" ], [have_memmove="0" ])
  +AC_CHECK_FUNCS(bcopy, [ have_bcopy="1" ], [ have_bcopy="0"] )
  +
   AC_SUBST(sendfile)
   AC_SUBST(fork)
   AC_SUBST(inet_addr)
  @@ -226,6 +229,8 @@
   AC_SUBST(have_sigaction)
   AC_SUBST(iconv)
   AC_SUBST(mmap)
  +AC_SUBST(have_memmove)
  +AC_SUBST(have_bcopy)
   
   dnl #----------------------------- Checks for Any required Headers
   AC_HEADER_STDC
  
  
  
  1.33      +2 -0      apache-2.0/src/lib/apr/include/apr.h.in
  
  Index: apr.h.in
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr.h.in,v
  retrieving revision 1.32
  retrieving revision 1.33
  diff -u -r1.32 -r1.33
  --- apr.h.in	2000/06/11 09:08:05	1.32
  +++ apr.h.in	2000/06/27 21:35:29	1.33
  @@ -68,6 +68,8 @@
   #define APR_HAVE_STRNCASECMP    @have_strncasecmp@
   #define APR_HAVE_STRDUP         @have_strdup@
   #define APR_HAVE_STRSTR         @have_strstr@
  +#define APR_HAVE_MEMMOVE        @have_memmove@
  +#define APR_HAVE_BCOPY          @have_bcopy@
   
   #if APR_HAVE_SYS_TYPES_H
   #include <sys/types.h>
  
  
  
  1.37      +11 -0     apache-2.0/src/lib/apr/include/apr_general.h
  
  Index: apr_general.h
  ===================================================================
  RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
  retrieving revision 1.36
  retrieving revision 1.37
  diff -u -r1.36 -r1.37
  --- apr_general.h	2000/06/18 10:58:19	1.36
  +++ apr_general.h	2000/06/27 21:35:29	1.37
  @@ -230,6 +230,17 @@
   int strncasecmp(const char *a, const char *b, size_t n);
   #endif
   
  +/*
  + * String and memory functions
  + */
  +
  +#if (!APR_HAVE_MEMMOVE)
  +#define memmove(a,b,c) bcopy(b,a,c)
  +#endif
  +
  +#if (!APR_HAVE_BZERO)
  +#define bzero(a,b) memset(a,0,b)
  +#endif
   
   #if APR_HAS_RANDOM
   /*
  
  
  

Re: cvs commit: apache-2.0/src/lib/apr/include apr.h.in apr_general.h

Posted by rb...@covalent.net.
> 
> You have an APR_HAVE_BCOPY setting above, but nothing about bzero(). The
> config test is also for bcopy...

Whoops.  I made that mistake four times and checked for it three.  Fixed
immediately, if it hasn't already been so.

> 
> If !APR_HAVE_MEMMOVE, wouldn't you also want to test for APR_HAVE_BCOPY?

Apache has never checked for bcopy, so I assume we are okay continuing
that tradition.

> And are there *any* platforms out there that don't have memmove()? I can't
> possibly imagine the case, so can't we just torch that?

Apache has always had this macro, so I am warry of removing it.

Ryan

_______________________________________________________________________________
Ryan Bloom                        	rbb@apache.org
406 29th St.
San Francisco, CA 94131
-------------------------------------------------------------------------------


Re: cvs commit: apache-2.0/src/lib/apr/include apr.h.in apr_general.h

Posted by Sascha Schumann <sa...@schumann.cx>.
> And are there *any* platforms out there that don't have memmove()? I can't
> possibly imagine the case, so can't we just torch that?

    SunOS 4, IIRC. Some portability does not really hurt. ;)

    - Sascha


Re: cvs commit: apache-2.0/src/lib/apr/include apr.h.in apr_general.h

Posted by Greg Stein <gs...@lyra.org>.
On Tue, Jun 27, 2000 at 09:35:30PM -0000, rbb@locus.apache.org wrote:
>...
>   --- apr.h.in	2000/06/11 09:08:05	1.32
>   +++ apr.h.in	2000/06/27 21:35:29	1.33
>   @@ -68,6 +68,8 @@
>    #define APR_HAVE_STRNCASECMP    @have_strncasecmp@
>    #define APR_HAVE_STRDUP         @have_strdup@
>    #define APR_HAVE_STRSTR         @have_strstr@
>   +#define APR_HAVE_MEMMOVE        @have_memmove@
>   +#define APR_HAVE_BCOPY          @have_bcopy@
>    
>    #if APR_HAVE_SYS_TYPES_H
>    #include <sys/types.h>
>   
>   
>   
>   1.37      +11 -0     apache-2.0/src/lib/apr/include/apr_general.h
>   
>   Index: apr_general.h
>   ===================================================================
>   RCS file: /home/cvs/apache-2.0/src/lib/apr/include/apr_general.h,v
>   retrieving revision 1.36
>   retrieving revision 1.37
>   diff -u -r1.36 -r1.37
>   --- apr_general.h	2000/06/18 10:58:19	1.36
>   +++ apr_general.h	2000/06/27 21:35:29	1.37
>   @@ -230,6 +230,17 @@
>    int strncasecmp(const char *a, const char *b, size_t n);
>    #endif
>    
>   +/*
>   + * String and memory functions
>   + */
>   +
>   +#if (!APR_HAVE_MEMMOVE)
>   +#define memmove(a,b,c) bcopy(b,a,c)
>   +#endif
>   +
>   +#if (!APR_HAVE_BZERO)
>   +#define bzero(a,b) memset(a,0,b)
>   +#endif

You have an APR_HAVE_BCOPY setting above, but nothing about bzero(). The
config test is also for bcopy...

If !APR_HAVE_MEMMOVE, wouldn't you also want to test for APR_HAVE_BCOPY?

And are there *any* platforms out there that don't have memmove()? I can't
possibly imagine the case, so can't we just torch that?

Cheers,
-g

-- 
Greg Stein, http://www.lyra.org/