-------- Message 1 of 2 Return-Path: bind-workers-request Received: by gw.home.vix.com id AA15469; Wed, 15 Dec 93 06:29:03 -0800 Received: by gw.home.vix.com id AA15463; Wed, 15 Dec 93 06:29:00 -0800 Received: from monkeyboy.WPI.EDU (gshapiro@monkeyboy.WPI.EDU [130.215.24.62]) by bigboote.WPI.EDU (8.6.5.Beta3/8.6) with ESMTP id JAA09389; Wed, 15 Dec 1993 09:28:50 -0500 Date: Wed, 15 Dec 93 09:08:10 +0000 (GMT) From: "Nigel Metheringham" To: Gregory Neil Shapiro Subject: Re: sendmail 8 and name resolution Cc: Paul A Vixie , bind-workers@vix.com, aej@WPI.EDU } [on compilation of things linked with bind 4.9.2 libresolv] } I tried to do this but ran into problems. When compiling sendmail } using libresolv.a from the BIND 4.9.2, the compilation fails since } things are multiply defined: } } [compilation] } ld: } /lib/libc.a(gethostent.o): sethostent: multiply defined } /lib/libc.a(gethostent.o): endhostent: multiply defined } /lib/libc.a(gethostent.o): gethostbyname: multiply defined } /lib/libc.a(gethostent.o): gethostbyaddr: multiply defined } *** Error code 1 } This must be a bug in the MIPs compiler set - we see very much the same problem on a MIPs system running 4.52. I put in a bug report about this a couple of years back (slightly different version of the OS, but same symptoms). Its relatively complex in that you cannot reproduce it in a small file (well I can't!). My hack to get round it was to make a new libresolv.a (actually for me its libresolv2.a) with the following defines on the cc command line -Dgethostbyname=Gethostbyname -Dgethostbyaddr=Gethostbyaddr and compile sendmail (or other package with same problems) with the same defines. Its messy but it works. [To complicate matters some programs of similar complexity and network functionality to sendmail do suffer from this problem when compiling, and some don't!] Nigel. --- # Nigel Metheringham -- (NeXT) EMail: nigelm@ohm.york.ac.uk # # System Administrator, Electronics Dept, University of York # # York YO1 5DD. Phone: +44 904 432374, Fax: +44 904 432335 # -------- Message 2 of 2 From: Gregory Neil Shapiro Received: from localhost (gshapiro@localhost) by monkeyboy.WPI.EDU (8.6.5.Beta3/8.6) id JAA05398; Wed, 15 Dec 1993 09:28:49 -0500 Date: Wed, 15 Dec 1993 09:28:49 -0500 Message-Id: <199312151428.JAA05398@monkeyboy.WPI.EDU> To: Paul A Vixie Cc: aej@WPI.EDU, bind-workers@vix.com Subject: Re: sendmail 8 and name resolution In-Reply-To: References: We think we have figured out what local_hostname_length does by trying it with different inputs. We can't be sure this is its only purpose. It seems to return the length of a local (in domain) hostname (without domain) if the hostname has the domain name appended. For example, our domain name is WPI.EDU. If we called local_hostname_length("manyjars.wpi.edu"), it returns 8. Other examples: Host name Length returned --------- --------------- manyjars.wpi.edu 8 manyjars 0 nic.near.net 0 With this in mind, we wrote this function: #include #include #include #include #include #include #include #include int local_hostname_length(hostname) char *hostname; { int len_host, len_domain; if (!*_res.defdname) res_init(); if (((len_host = strlen(hostname)) > (len_domain = strlen(_res.defdname))) && (strcasecmp(hostname + len_host - len_domain,_res.defdname) == 0) && hostname[len_host - len_domain - 1] == '.') return(len_host - len_domain - 1); else return(0); } Maybe this can be included in 4.9.2's libresolv.a so it will work properly under Ultrix without pulling in libc.a's gethostent.o. If anyone has more information on Ultrix's local_hostname_length, please let me know so we can come up with a more complete replacement. -------- End 2 Messages