From: Dick St.P. <stpeters@NetHeaven.com> - 2005-07-22 19:08:43
|
fre...@va... writes: > What is the difference of ar_res_init and res_init? > I want to have the async-resolver instead of the default OS resolver, > and sid-filter/Makefile.m4 & libar/Makefile.m4 isn't changed. The "Notes" in libar/README say: o If your vendor has decided to implement the global "_res" structure in a way that makes it unlike the de facto standard, you will need to enable some code that handles this. Check Makefile.m4 for the lines you will need to edit to make this work. libar/Makefile.m4 says: dnl If your operating system vendor changed the public-but-not-really dnl "_res" structure to something different than the de facto standard, dnl enable the next line. OpenBSD 3.7 needs this, and there may be others. dnl APPENDDEF(`confENVDEF', `-DNONSTANDARD_RES_STRUCTURE') The comment block above ar_res_init() in libar/fix.c says: ** AR_RES_STRUCTURE -- res_init() replacement for systems that don't follow ** the de facto standards (e.g. OpenBSD 3.7) ("AR_RES_STRUCTURE" is probably supposed to be "AR_RES_INIT") So you need ar_res_init() only if you both use the async resolver and use certain OSs. Otherwise, use res_init(). Anyway, the right way to make the change is to make it depend on the NONSTANDARD_RES_STRUCTURE switch, either by inserting these lines near the top of libar/ar.c #ifndef NONSTANDARD_RES_STRUCTURE #define ar_res_init res_init #endif or by changing the libar/ar.c code around line 1041 to read #ifdef NONSTANDARD_RES_STRUCTURE ar_res_init(); #else res_init(); #endif Then defining the switch will make all the changes on systems needing them. I do not know if Solaris needs them. -- Dick St.Peters, stpeters@NetHeaven.com Gatekeeper, NetHeaven, Saratoga Springs, NY |