Bind 8.2 patch
Andreas Jaeger
aj@suse.de
Mon Dec 13 04:29:00 GMT 1999
Here's a small patch for the resolv code. resolv.h and Makefile are
just tidying up, for res_libc I fixed a bug in the handling of _res.
Andreas
1999-12-13 Andreas Jaeger <aj@suse.de>
* resolv/resolv.h: Remove K&R compatibility.
* resolv/res_libc.c: Move definition of _res after res_init,
res_init should use the threaded specific context.
* resolv/Makefile (+cflags): Remove -Wno-comment since it's not
needed anymore.
============================================================
Index: resolv/resolv.h
--- resolv/resolv.h 1999/12/04 18:02:08 1.22
+++ resolv/resolv.h 1999/12/13 12:16:30
@@ -136,19 +136,19 @@
typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error }
res_sendhookact;
-typedef res_sendhookact (*res_send_qhook)__P((struct sockaddr_in * const *ns,
- const u_char **query,
- int *querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
-
-typedef res_sendhookact (*res_send_rhook)__P((const struct sockaddr_in *ns,
- const u_char *query,
- int querylen,
- u_char *ans,
- int anssiz,
- int *resplen));
+typedef res_sendhookact (*res_send_qhook) (struct sockaddr_in * const *ns,
+ const u_char **query,
+ int *querylen,
+ u_char *ans,
+ int anssiz,
+ int *resplen);
+
+typedef res_sendhookact (*res_send_rhook) (const struct sockaddr_in *ns,
+ const u_char *query,
+ int querylen,
+ u_char *ans,
+ int anssiz,
+ int *resplen);
struct res_sym {
int number; /* Identifying number, like T_MX */
@@ -270,20 +270,20 @@
#define res_send __res_send
__BEGIN_DECLS
-void fp_nquery __P((const u_char *, int, FILE *));
-void fp_query __P((const u_char *, FILE *));
-const char * hostalias __P((const char *));
-void p_query __P((const u_char *));
-void res_close __P((void));
-int res_init __P((void));
-int res_isourserver __P((const struct sockaddr_in *));
-int res_mkquery __P((int, const char *, int, int, const u_char *,
- int, const u_char *, u_char *, int));
-int res_query __P((const char *, int, int, u_char *, int));
-int res_querydomain __P((const char *, const char *, int, int,
- u_char *, int));
-int res_search __P((const char *, int, int, u_char *, int));
-int res_send __P((const u_char *, int, u_char *, int));
+void fp_nquery (const u_char *, int, FILE *) __THROW;
+void fp_query (const u_char *, FILE *) __THROW;
+const char * hostalias (const char *) __THROW;
+void p_query (const u_char *) __THROW;
+void res_close (void) __THROW;
+int res_init (void) __THROW;
+int res_isourserver (const struct sockaddr_in *) __THROW;
+int res_mkquery (int, const char *, int, int, const u_char *,
+ int, const u_char *, u_char *, int) __THROW;
+int res_query (const char *, int, int, u_char *, int) __THROW;
+int res_querydomain (const char *, const char *, int, int,
+ u_char *, int) __THROW;
+int res_search (const char *, int, int, u_char *, int) __THROW;
+int res_send (const u_char *, int, u_char *, int) __THROW;
__END_DECLS
#if !defined(SHARED_LIBBIND) || defined(_LIBC)
============================================================
Index: resolv/res_libc.c
--- resolv/res_libc.c 1999/12/04 18:03:12 1.1
+++ resolv/res_libc.c 1999/12/13 12:16:30
@@ -38,9 +38,6 @@
#include <string.h>
#include <unistd.h>
-#undef _res
-
-struct __res_state _res;
/* This is the old res_init function. It has been moved from
res_data.c to this file since res_init should go into libc.so but
@@ -89,6 +86,11 @@
/* We need a resolver context - in unthreaded apps, this weak function
provides it. */
+
+#undef _res
+
+struct __res_state _res;
+
struct __res_state *
weak_const_function
============================================================
Index: resolv/Makefile
--- resolv/Makefile 1999/12/04 18:00:49 1.30
+++ resolv/Makefile 1999/12/13 12:16:30
@@ -57,7 +57,7 @@
-Dgetnetbyaddr=res_getnetbyaddr
# The BIND code elicits some harmless warnings.
-+cflags += -Wno-strict-prototypes -Wno-comment -Wno-write-strings
++cflags += -Wno-strict-prototypes -Wno-write-strings
# Depend on libc.so so a DT_NEEDED is generated in the shared objects.
# This ensures they will load libc.so for needed symbols if loaded by
============================================================
Index: NEWS
--- NEWS 1999/12/04 07:53:51 1.58
+++ NEWS 1999/12/13 12:16:34
@@ -22,6 +22,10 @@
* ldconfig program added by Andreas Jaeger and Jakub Jelinek.
+* The resolver code has been updated from bind 8.2.2-5 which supports
+ threads. No changes should be necessary for user programs. The
+ integration was done by Andreas Jaeger and Adam D. Bradley.
+
Version 2.1.2
--
Andreas Jaeger
SuSE Labs aj@suse.de
private aj@arthur.rhein-neckar.de
More information about the Libc-alpha
mailing list