Page MenuHomeFreeBSD

D57922.diff
No OneTemporary

D57922.diff

diff --git a/lib/libc/nameser/ns_parse.c b/lib/libc/nameser/ns_parse.c
--- a/lib/libc/nameser/ns_parse.c
+++ b/lib/libc/nameser/ns_parse.c
@@ -38,12 +38,7 @@
/* Macros. */
-#if !defined(SOLARIS2) || defined(__COVERITY__)
#define RETERR(err) do { errno = (err); return (-1); } while (0)
-#else
-#define RETERR(err) \
- do { errno = (err); if (errno == errno) return (-1); } while (0)
-#endif
#define PARSE_FMT_PRESO 0 /* Parse using presentation-format names */
#define PARSE_FMT_WIRE 1 /* Parse using network-format names */
diff --git a/lib/libc/resolv/res_comp.c b/lib/libc/resolv/res_comp.c
--- a/lib/libc/resolv/res_comp.c
+++ b/lib/libc/resolv/res_comp.c
@@ -240,17 +240,6 @@
* Note that one _ comes from C and the others come from us.
*/
-#ifdef SOLARIS2
-#ifdef __putlong
-#undef __putlong
-#endif
-#ifdef __putshort
-#undef __putshort
-#endif
-#pragma weak putlong = __putlong
-#pragma weak putshort = __putshort
-#endif /* SOLARIS2 */
-
void __putlong(u_int32_t src, u_char *dst) { ns_put32(src, dst); }
void __putshort(u_int16_t src, u_char *dst) { ns_put16(src, dst); }
#ifndef __ultrix__
diff --git a/lib/libc/resolv/res_init.c b/lib/libc/resolv/res_init.c
--- a/lib/libc/resolv/res_init.c
+++ b/lib/libc/resolv/res_init.c
@@ -95,10 +95,6 @@
#include "res_private.h"
-#ifdef SOLARIS2
-#include <sys/systeminfo.h>
-#endif
-
static void res_setoptions(res_state, const char *, const char *);
#ifdef RESOLVSORT
@@ -219,28 +215,6 @@
#endif
res_setservers(statp, u, nitems(u));
-#ifdef SOLARIS2
- /*
- * The old libresolv derived the defaultdomain from NIS/NIS+.
- * We want to keep this behaviour
- */
- {
- char buf[sizeof(statp->defdname)], *cp;
- int ret;
-
- if ((ret = sysinfo(SI_SRPC_DOMAIN, buf, sizeof(buf))) > 0 &&
- (unsigned int)ret <= sizeof(buf)) {
- if (buf[0] == '+')
- buf[0] = '.';
- cp = strchr(buf, '.');
- cp = (cp == NULL) ? buf : (cp + 1);
- strncpy(statp->defdname, cp,
- sizeof(statp->defdname) - 1);
- statp->defdname[sizeof(statp->defdname) - 1] = '\0';
- }
- }
-#endif /* SOLARIS2 */
-
/* Allow user to override the local domain definition */
if ((cp = secure_getenv("LOCALDOMAIN")) != NULL) {
(void)strncpy(statp->defdname, cp, sizeof(statp->defdname) - 1);
@@ -580,22 +554,6 @@
if (statp->options & RES_DEBUG)
printf(";;\ttimeout=%d\n", statp->retrans);
#endif
-#ifdef SOLARIS2
- } else if (!strncmp(cp, "retrans:", sizeof("retrans:") - 1)) {
- /*
- * For backward compatibility, 'retrans' is
- * supported as an alias for 'timeout', though
- * without an imposed maximum.
- */
- statp->retrans = atoi(cp + sizeof("retrans:") - 1);
- } else if (!strncmp(cp, "retry:", sizeof("retry:") - 1)){
- /*
- * For backward compatibility, 'retry' is
- * supported as an alias for 'attempts', though
- * without an imposed maximum.
- */
- statp->retry = atoi(cp + sizeof("retry:") - 1);
-#endif /* SOLARIS2 */
} else if (!strncmp(cp, "attempts:", sizeof("attempts:") - 1)){
i = atoi(cp + sizeof("attempts:") - 1);
if (i <= RES_MAXRETRY)

File Metadata

Mime Type
text/plain
Expires
Mon, Jun 29, 3:39 PM (2 h, 33 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
34465713
Default Alt Text
D57922.diff (3 KB)

Event Timeline