sunw_updrec.c revision 7c478bd95313f5f23a4c958a745db2134aa03244
/*
* Copyright (c) 1999 by Sun Microsystems, Inc.
* All rights reserved.
*/
#pragma ident "%Z%%M% %I% %E% SMI"
/*
* As of BIND 8.2.2, ISC (a) removed res_mkupdate(), res_update(), and
* res_mkupdrec() from what they consider the supported interface. The
* functions still exist, but their calling interface has changed, since
* the ns_updrec structure has changed.
*
* It seems probable that res_mkupdate() etc. will return, though possibly
* with other changes, in some future BIND release. In order to avoid
* going to PSARC twice (once to remove the functions, and then again to
* add them back), we retain the old interface as a wrapper around the
* new one.
*/
#include <port_before.h>
#include <malloc.h>
#include <strings.h>
#include <res_update.h>
#include <port_after.h>
void res_freeupdrec(ns_updrec *);
static int
return (-1);
} else {
}
return (0);
}
static int
/* XXX r_prev and r_next unchanged */
return (-1);
} else {
}
return (0);
}
static void
}
}
static __ISC_ns_updrec *
__ISC_ns_updrec *list = 0, *r, *p;
if (old == 0)
return (0);
if ((r = calloc(1, sizeof (*r))) == 0 ||
free(r);
return (0);
}
if (p != 0)
else
list = r;
}
return (list);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
delete_list(r);
return (ret);
}
int
__ISC_ns_updrec *r;
int ret;
return (-1);
ret = __ISC_res_update(r);
delete_list(r);
return (ret);
}
__ISC_ns_updrec *n;
ns_updrec *o;
if (n == 0)
return (0);
if ((o = calloc(1, sizeof (*o))) != 0) {
if (new2old(n, o) != 0) {
res_freeupdrec(o);
o = 0;
}
}
return (o);
}
void
if (rrecp == 0)
return;
/* Note: freeing r_dp is the caller's responsibility. */
}