Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!hp-pcd!hpfcso!hpfcdc!raf From: raf@hpfcdc.HP.COM (Rick Ferreri) Newsgroups: comp.sys.hp Subject: Re: libc.a libresolv.a and strncasecomp() question Message-ID: <5570539@hpfcdc.HP.COM> Date: 21 Nov 90 16:20:38 GMT References: <1150050@misty.boeing.com> Organization: HP Fort Collins, Co. Lines: 66 > / hpfcdc:comp.sys.hp / jsadler@misty.boeing.com (Jim Sadler) / 11:01 am Nov 19, 1990 / > > The bsd version of ftpd has a call to strncasecmp(). On a sun this is > in the libresolv.a library. The HP does not have this library, most of > the routines in the Sun library are in the /lib/libc.a on the HP. When I > look at the libc.a nm shows: > > Symbols from /lib/libc.a[ruserpass.o]: > > Name Value Scope Type Subspace > > $global$ | |undef |data | > __filbuf | |undef |code | > > > Stuff deleted. > > > getlong | 1856|sdef |entry |$CODE$ > catch | 2480|static|entry |$CODE$ > strcasecmp | 2504|static|entry |$CODE$ > strncasecmp | 2608|static|entry |$CODE$ > $THIS_DATA$ |1073741824|static|data |$DATA$ > $THIS_BSS$ |1073742448|static|data |$BSS$ > > My first question is why does the linker give: > > ld: Unsatisfied symbols: > strncasecmp (code) The strncasecmp that you see when you nm libc.a is a "static entry" not an "extern entry". It cannot be reached externally. In other words, the ruserpass() source code has a static routine named "strncasecmp()" that it uses internally. There is, however, a strncasecmp() entry point in /usr/lib/libBSD.a which should do the trick for you. Try linking with this library too. The ruserpass() code most likely has its own local version of strncasecmp() since there is no libc entry point for strncasecmp() and there is no guarantee that the person using the ruserpass() routine will link in libBSD.a. > > My second question is how do I get around this ? Again. Try linking in libBSD.a. > > The reason I'm using the BSD version of ftpd is that it's been modified > to provide the logging that we need. > > jim sadler > 206-234-9009 email uunet!bcstec!jsadler | jsadler@misty.boeing.com > > This service is brought to you by the computing mafia of Boeing (BCS). > Oh ya > None of the above is an opinion of The Boeing Co. (If they found out > that we had opinions they would probally create a new divison to figure > out to hire opinionless employee's) > ---------- Hope this helps. Rick Ferreri #include