freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Sam Denton <denton AT wantec.com>
- To: 'TDS Development Group' <freetds AT franklin.oit.unc.edu>
- Subject: Re: Problem compiling current snapshot
- Date: Fri, 5 Apr 2002 14:41:55 -0600
Re: INADDR_NONE, here are a couple of threads that may be useful. The first
is a bit quick-and-dirty, the second one is fancier, but seems to cover more
architectures. (Note: I am not an autoconf guru, so don't ask me for help
with actually implementing any of these.)
http://sources.redhat.com/ml/autoconf/1999-03/msg00081.html
* To: autoconf AT gnu.org
* Subject: INADDR_NONE
* From: lars brinkhoff <lars AT nocrew.org>
* Date: 29 Mar 1999 16:58:41 +0200
Some systems don't define INADDR_NONE. This macro might be helpful.
There might be a better name for it.
AC_DEFUN(AC_HAVE_INADDR_NONE,
[AC_CACHE_CHECK([whether INADDR_NONE is defined], ac_cv_have_inaddr_none,
[AC_TRY_COMPILE(
[#include <sys/types.h>
#include <netinet/in.h>],
[return INADDR_NONE;],
ac_cv_have_inaddr_none=yes,
ac_cv_have_inaddr_none=no)])
if test $ac_cv_have_inaddr_none != yes; then
AC_DEFINE(INADDR_NONE, 0xffffffff)
fi])
http://www.apachelabs.org/apache-mbox/199912.mbox/%3C19991225194053.A28315@s
chumann.cx%3E
From: Sascha Schumann <sascha AT schumann.cx>
Subject: [PATCH] improved INADDR_NONE check
Date: Sat, 25 Dec 1999 18:40:53 GMT
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Hi,
this patch fixes some portability issues in the INADDR_NONE
m4 macro. In particular, some platforms need to include
<sys/types.h>.
--
Regards,
Sascha Schumann
Consultant
--J/dobhs11T7y2rNN
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=inaddr-none-patch
Index: acinclude.m4
===================================================================
RCS file: /cvs/apache/apache-2.0/src/acinclude.m4,v
retrieving revision 1.12
diff -u -r1.12 acinclude.m4
--- acinclude.m4 1999/12/24 21:22:27 1.12
+++ acinclude.m4 1999/12/25 18:36:09
@@ -147,9 +147,18 @@
dnl
AC_DEFUN(APACHE_INADDR_NONE,[
AC_TRY_COMPILE([
+#ifdef HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+#ifdef HAVE_SYS_SOCKET_H
#include <sys/socket.h>
+#endif
+#ifdef HAVE_NETINET_IN_H
#include <netinet/in.h>
+#endif
+#ifdef HAVE_ARPA_INET_H
#include <arpa/inet.h>
+#endif
],[
unsigned long foo = INADDR_NONE;
],[
--J/dobhs11T7y2rNN--
Sam Denton, WAN Technologies, INC.
(314) 428-0888 / (800) 926-7771 Main Office
-----Original Message-----
From: Steve Langasek [mailto:vorlon AT netexpress.net]
Sent: Thursday, April 04, 2002 1:59 PM
To: TDS Development Group
Subject: [freetds] Re: Problem compiling current snapshot
Hello,
On Thu, Apr 04, 2002 at 12:54:33PM -0700, Steven J. Backus wrote:
> I'm having a problem with dblib, thought I'd try the current
> snapshot to see if it was fixed. I get:
> config.c: In function `lookup_host':
> config.c:523: `INADDR_NONE' undeclared (first use in this function)
> config.c:523: (Each undeclared identifier is reported only once
> config.c:523: for each function it appears in.)
> I'm on Intel Solaris 2.8 using gcc 2.95.2. I've looked everywhere
> for this variable and can't find it declared. TIA for any help.
On Linux, INADDR_NONE is defined to ((in_addr_t) 0xffffffff); I believe
this is also the correct value on other platforms.
If you can't find it anywhere in /usr/include (netinet/in.h is the right
file here), then perhaps this should be conditionally defined in
FreeTDS.
Steve Langasek
postmodern programmer
-
Problem compiling current snapshot,
Steven J. Backus, 04/04/2002
- <Possible follow-up(s)>
- Re: Problem compiling current snapshot, Steve Langasek, 04/04/2002
- Re: Problem compiling current snapshot, Sam Denton, 04/05/2002
- Re: Problem compiling current snapshot, Brian Bruns, 04/06/2002
- Re: Problem compiling current snapshot, Brian Bruns, 04/16/2002
- Re: Problem compiling current snapshot, Sam Denton, 04/17/2002
Archive powered by MHonArc 2.6.24.