Fwd: htdig-3.2.0b6: getpeername_length_t

Geoffrey Hutchison <[email protected]> Tue, 16 Aug 2005 11:26:40 -0400
Newsgroups gmane.comp.web.htdig.devel
Message-ID <[email protected]>

Begin forwarded message:

> From: Harald Koenig <[email protected]>
> Date: August 16, 2005 11:19:50 AM EDT
> To: [email protected]
> Cc: Harald Koenig <[email protected]>
> Subject: htdig-3.2.0b6: getpeername_length_t
>
>
> Hi Geoff,
>
> trying to compile htdig-3.2.0b6 on IRIX 6.5.13m I had two problems:
>
> 1) autoconf test for GETPEERNAME_LENGTH_T is broken for sock_t == void
>
> IRIX has the following definition for getpeername
>
>     getpeername(int, void*, int*)
>
> and the "correct" test using gcc-3.3.3 fails like this
>
>     configure:27494: g++ -Wa,-mips3   -c -g -O2 -Wall -fno-rtti - 
> fno-exceptions  conftest.cc >&5
>     conftest.cc:123: error: variable or field `s' declared void
>     configure:27500: $? = 1
>     configure: failed program was:
>     ...
>     | #include <sys/types.h>
>     | #include <sys/socket.h>
>     |  extern "C" int getpeername(int, void *, int *);
> ==>    |  void s;  int l;
>     | int
>     | main ()
>     | {
>     |  getpeername(0, &s, &l);
>     |   ;
>     |   return 0;
>     | }
>
>
> a possible patch would be:
>
> ---------------------------------------------------------------------- 
> ---------
> --- htdig-3.2.0b6/configure.in~    2004-06-14 10:25:30.000000000 +0200
> +++ htdig-3.2.0b6/configure.in    2005-08-16 15:24:39.000000000 +0200
> @@ -209,7 +209,7 @@
>      AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h>
>  #include <sys/socket.h>
>   extern "C" int getpeername(int, $sock_t *, $getpeername_length_t *);
> - $sock_t s;  $getpeername_length_t l; ]], [[ getpeername(0, &s,  
> &l); ]])],[ac_found=yes ; break 2],[ac_found=no])
> + struct sockaddr s;  $getpeername_length_t l; ]], [[ getpeername 
> (0, &s, &l); ]])],[ac_found=yes ; break 2],[ac_found=no])
>    done
>  done
>
> ---------------------------------------------------------------------- 
> ---------
>
>
>
> 2) db/mutex.h isn't compatible with  /usr/include/mutex.h
>
> error message:
>
>  g++ -Wa,-mips3 -DHAVE_CONFIG_H -I. -I/soft/htdig/htdig-3.2.0b6/ 
> htdig-3.2.0b6/htlib -I../include -DDEFAULT_CONFIG_FILE=\"/usr/local/ 
> htdig/conf/htdig.conf\" -I/soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/ 
> include -I/soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/htlib -I/soft/ 
> htdig/htdig-3.2.0b6/htdig-3.2.0b6/htnet -I/soft/htdig/htdig-3.2.0b6/ 
> htdig-3.2.0b6/htcommon -I/soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/ 
> htword -I/soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/db -I../db -g -O2 - 
> Wall -fno-rtti -fno-exceptions -c /soft/htdig/htdig-3.2.0b6/ 
> htdig-3.2.0b6/htlib/Configuration.cc  -DPIC -o .libs/Configuration.o
> In file included from /usr/local/gcc-3.3.3/include/c++/3.3.3/bits/ 
> ios_base.h:45,
>                  from /usr/local/gcc-3.3.3/include/c++/3.3.3/ios:49,
>                  from /usr/local/gcc-3.3.3/include/c++/3.3.3/ 
> ostream:45,
>                  from /usr/local/gcc-3.3.3/include/c++/3.3.3/ 
> iostream:45,
>                  from /soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/htlib/ 
> htString.h:23,
>                  from /soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/htlib/ 
> Dictionary.h:22,
>                  from /soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/htlib/ 
> Configuration.h:107,
>                  from /soft/htdig/htdig-3.2.0b6/htdig-3.2.0b6/htlib/ 
> Configuration.cc:24:
> /usr/local/gcc-3.3.3/include/c++/3.3.3/mips-sgi-irix6.5/bits/ 
> atomicity.h: In
>    function `_Atomic_word __exchange_and_add(_Atomic_word*, int)':
> /usr/local/gcc-3.3.3/include/c++/3.3.3/mips-sgi-irix6.5/bits/ 
> atomicity.h:40: error: `
>    test_then_add' undeclared (first use this function)
> /usr/local/gcc-3.3.3/include/c++/3.3.3/mips-sgi-irix6.5/bits/ 
> atomicity.h:40: error: (Each
>    undeclared identifier is reported only once for each function it  
> appears
>    in.)
> gmake[1]: *** [Configuration.lo] Error 1
> gmake[1]: Leaving directory `/net/jazz/fs2/scr/jazz/koenig/ 
> htdig-3.2.0b6/ARENA/32/htlib'
>
>
> I've renamed db/mutex.h to db/db_mutex.h and applied the patch below
> which avoids this problem:
>
> ---------------------------------------------------------------------- 
> ---------
> diff -ur orig/htdig-3.2.0b6/db/Makefile.am htdig-3.2.0b6/db/ 
> Makefile.am
> --- orig/htdig-3.2.0b6/db/Makefile.am    2002-02-02  
> 19:18:05.000000000 +0100
> +++ htdig-3.2.0b6/db/Makefile.am    2005-08-16 14:36:15.000000000  
> +0200
> @@ -168,7 +168,7 @@
>      log_ext.h \
>      mp.h \
>      mp_ext.h \
> -    mutex.h \
> +    db_mutex.h \
>      mutex_ext.h \
>      os.h \
>      os_ext.h \
> diff -ur orig/htdig-3.2.0b6/db/Makefile.in htdig-3.2.0b6/db/ 
> Makefile.in
> --- orig/htdig-3.2.0b6/db/Makefile.in    2004-06-14  
> 10:25:30.000000000 +0200
> +++ htdig-3.2.0b6/db/Makefile.in    2005-08-16 14:36:04.000000000  
> +0200
> @@ -317,7 +317,7 @@
>      log_ext.h \
>      mp.h \
>      mp_ext.h \
> -    mutex.h \
> +    db_mutex.h \
>      mutex_ext.h \
>      os.h \
>      os_ext.h \
> diff -ur orig/htdig-3.2.0b6/db/db_int.h htdig-3.2.0b6/db/db_int.h
> --- orig/htdig-3.2.0b6/db/db_int.h    2004-01-12 13:48:23.000000000  
> +0100
> +++ htdig-3.2.0b6/db/db_int.h    2005-08-16 14:37:09.000000000 +0200
> @@ -260,7 +260,7 @@
>   * More general includes.
>   *******************************************************/
>  #include "debug.h"
> -#include "mutex.h"
> +#include "db_mutex.h"
>  #include "mutex_ext.h"
>  #include "region.h"
>  #include "env_ext.h"
> ---------------------------------------------------------------------- 
> ---------
>
>
> Harald Koenig
> -- 
> "I hope to die                                      ___       _____
> before I *have* to use Microsoft Word.",           0--,|    /OOOOOOO\
> Donald E. Knuth, 02-Oct-2001 in Tuebingen.        <_/  /  / 
> OOOOOOOOOOO\
>                                                     \  \/ 
> OOOOOOOOOOOOOOO\
>                                                       \  
> OOOOOOOOOOOOOOOOO|//
> Harald Koenig                                          \/\/\/\/\/\/ 
> \/\/\/
> science+computing ag                                    //  /     \ 
> \  \
> [email protected]                            ^^^^^        
> ^^^^^
>



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf
_______________________________________________
ht://Dig Developer mailing list:
[email protected]
List information (subscribe/unsubscribe, etc.)
https://lists.sourceforge.net/lists/listinfo/htdig-dev