apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From field...@apache.org
Subject cvs commit: apr CHANGES apr_common.m4
Date Fri, 09 Feb 2001 00:56:05 GMT
fielding    01/02/08 16:56:05

  Modified:    .        CHANGES apr_common.m4
  Log:
  Add APR_TRY_GCC_WARNING macro to dynamically test the iconv prototype
  if gcc is being used.
  
  Revision  Changes    Path
  1.56      +5 -0      apr/CHANGES
  
  Index: CHANGES
  ===================================================================
  RCS file: /home/cvs/apr/CHANGES,v
  retrieving revision 1.55
  retrieving revision 1.56
  diff -u -r1.55 -r1.56
  --- CHANGES	2001/02/07 16:40:52	1.55
  +++ CHANGES	2001/02/09 00:56:03	1.56
  @@ -1,5 +1,10 @@
   Changes with APR b1  
   
  +  *) Added the APR_TRY_GCC_WARNING configure macro for testing a
  +     gcc-specific compile with -Werror) and the APR_CHECK_ICONV_INBUF
  +     macro to test for annoying iconv prototype differences.
  +     [Jeff Trawick, Roy Fielding]
  +
     *) Fix a problem with configure on NetBSD.  We must include sys/types.h
        for some platforms.  [jun-ichiro hagino <itojun@kame.net>]
   
  
  
  
  1.13      +30 -4     apr/apr_common.m4
  
  Index: apr_common.m4
  ===================================================================
  RCS file: /home/cvs/apr/apr_common.m4,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- apr_common.m4	2001/02/08 02:37:29	1.12
  +++ apr_common.m4	2001/02/09 00:56:04	1.13
  @@ -1,3 +1,32 @@
  +dnl APR_TRY_GCC_WARNING(INCLUDES, FUNCTION-BODY,
  +dnl             [ACTION-IF-FOUND [, ACTION-IF-NOT-FOUND]])
  +AC_DEFUN(APR_TRY_GCC_WARNING,
  +[if test "$GCC" = "yes"; then 
  +  changequote(', ')
  +  cat > conftest.$ac_ext <<EOTEST
  +#include "confdefs.h"
  +'$1'
  +int main(int argc, const char * const argv[]) {
  +'$2'
  +; return 0; }
  +EOTEST
  +  changequote([, ])
  +  if ${CC-cc} -c -Wall -Wmissing-prototypes -Wstrict-prototypes -Wmissing-declarations
-Werror $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&AC_FD_CC ; then
  +    ifelse([$3], , :, [rm -rf conftest*
  +    $3])
  +  else
  +    echo "configure: warning on program:" >&AC_FD_CC
  +    cat conftest.$ac_ext >&AC_FD_CC
  +    ifelse([$4], , , [rm -rf conftest*
  +    $4])
  +  fi
  +else
  +    # Not using gcc -- assume everything is okay
  +    ifelse([$3], , :, [rm -rf conftest*
  +    $3])
  +fi
  +rm -f conftest*])
  +
   dnl
   dnl RUN_SUBDIR_CONFIG_NOW(dir [, sub-package-cmdline-args])
   dnl
  @@ -300,13 +329,10 @@
   AC_DEFUN(APR_CHECK_ICONV_INBUF,[
   AC_MSG_CHECKING(for type of inbuf parameter to iconv)
   if test "x$apr_iconv_inbuf_const" = "x"; then
  -    AC_TRY_COMPILE([
  +    APR_TRY_GCC_WARNING([
       #include <stddef.h>
       #include <iconv.h>
       ],[
  -    #if defined(__GLIBC__) && __GLIBC__ == 2 && __GLIBC_MINOR < 2
  -    #error We know this version of glibc has const char **, so fail this compile
  -    #endif
       iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
       ], apr_iconv_inbuf_const="0", apr_iconv_inbuf_const="1")
   fi
  
  
  

Mime
View raw message