From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: PATCH: use bind/netdb.h where appropriate
Date: Thu, 19 Feb 2009 10:16:23 +0000 [thread overview]
Message-ID: <14494.1235038583@csr.com> (raw)
I'm not sure how long this has been going on, but I'm getting warnings
from using some network utility functions. It seems that at least
on Fedora when linked against the bind libraries we should be
including bind/netdb.h instead of netdb.h.
This will probably unleash a new tsunami of knock-on incompatibilities.
Index: configure.ac
===================================================================
RCS file: /cvsroot/zsh/zsh/configure.ac,v
retrieving revision 1.117
diff -u -r1.117 configure.ac
--- configure.ac 15 Jan 2009 14:49:51 -0000 1.117
+++ configure.ac 19 Feb 2009 10:12:53 -0000
@@ -755,6 +755,12 @@
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(bind, gethostbyname2)
+case $LIBS in
+ *-lbind*)
+ AC_CHECK_HEADERS(bind/netdb.h)
+ ;;
+esac
+
dnl ---------------
dnl CHECK FOR ICONV
dnl ---------------
Index: Src/Modules/tcp.h
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/Modules/tcp.h,v
retrieving revision 1.8
diff -u -r1.8 tcp.h
--- Src/Modules/tcp.h 28 Apr 2003 15:06:31 -0000 1.8
+++ Src/Modules/tcp.h 19 Feb 2009 10:12:54 -0000
@@ -37,7 +37,16 @@
#include <sys/types.h>
#include <sys/socket.h>
+
+#ifdef HAVE_BIND_NETDB_H
+/*
+ * On systems where we're using -lbind, this has more definitions
+ * than the standard header.
+ */
+#include <bind/netdb.h>
+#else
#include <netdb.h>
+#endif
/*
* For some reason, configure doesn't always detect netinet/in_systm.h.
--
Peter Stephenson <pws@csr.com> Software Engineer
CSR PLC, Churchill House, Cambridge Business Park, Cowley Road
Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070
reply other threads:[~2009-02-19 10:26 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=14494.1235038583@csr.com \
--to=pws@csr.com \
--cc=zsh-workers@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).