aboutsummaryrefslogtreecommitdiff
path: root/resolv/res_send.c
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-08-22 22:47:57 +0000
committerRoland McGrath <roland@gnu.org>1995-08-22 22:47:57 +0000
commit3cf595e562f955e399d80ea9d053e41d50469e6b (patch)
tree77ed930262ae9606543c580c4a3d69141c1bd561 /resolv/res_send.c
parent207eb76afba6503af9c4ab5711bfd76f9697c1ad (diff)
downloadglibc-3cf595e562f955e399d80ea9d053e41d50469e6b.zip
glibc-3cf595e562f955e399d80ea9d053e41d50469e6b.tar.gz
glibc-3cf595e562f955e399d80ea9d053e41d50469e6b.tar.bz2
Tue Aug 22 16:49:12 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu>
* inet/netdb.h: Moved to resolv. * inet/Makefile (headers): Remove netdb.h. * resolv/Makefile (headers): Add netdb.h. * resolv/gethnamaddr.c, resolv/inet_addr.c, resolv/netdb.h, resolv/res_send.c: Updated from BIND-4.9.3-BETA26. * hurd/thread-cancel.c: If SS->cancel_hook is not null, call it before resuming the thread. * hurd/hurd/signal.h (struct hurd_sigstate): New member `cancel_hook'. * hurd/Makefile: Removed dep on hurd/signal.h for RPC stub objects. Mon Aug 21 16:37:09 1995 Roland McGrath <roland@churchy.gnu.ai.mit.edu> * sysdeps/i386/dl-machine.h (elf_machine_rel): Grok R_386_NONE relocs, and do nothing. Why the linker generates them we may never know. * sysdeps/mach/hurd/i386/intr-msg.h: New file.
Diffstat (limited to 'resolv/res_send.c')
-rw-r--r--resolv/res_send.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/resolv/res_send.c b/resolv/res_send.c
index 4ee52b4..f8e58f3 100644
--- a/resolv/res_send.c
+++ b/resolv/res_send.c
@@ -109,6 +109,13 @@ static int vc = 0; /* is the socket a virtual ciruit? */
#define FD_ZERO(p) bzero((char *)(p), sizeof(*(p)))
#endif
+/* XXX - this should be done in portability.h */
+#if (defined(BSD) && (BSD >= 199103)) || defined(linux)
+# define CAN_RECONNECT 1
+#else
+# define CAN_RECONNECT 0
+#endif
+
#ifndef DEBUG
# define Dprint(cond, args) /*empty*/
# define DprintQ(cond, args, query, size) /*empty*/
@@ -484,7 +491,7 @@ res_send(buf, buflen, ans, anssiz)
_res_close();
s = socket(PF_INET, SOCK_DGRAM, 0);
if (s < 0) {
-#if !defined(BSD) || (BSD < 199103)
+#if !CAN_RECONNECT
bad_dg_sock:
#endif
terrno = errno;
@@ -538,7 +545,7 @@ res_send(buf, buflen, ans, anssiz)
* for responses from more than one server.
*/
if (connected) {
-#if defined(BSD) && (BSD >= 199103)
+#if CAN_RECONNECT
struct sockaddr_in no_addr;
no_addr.sin_family = AF_INET;