What is herror(3)?

Tim Ramsey tar at hilbert.math.ksu.edu
Wed Aug 15 20:49:42 AEST 1990


I just pulled /networking/ftp.tar.Z off of uunet.  When I try to compile it
ld dies:

cc -o ftp -O -I/usr/local/include -I../ftpd/arpa -I. cmds.o cmdtab.o ftp.o
  glob.o main.o ruserpass.o domacro.o getpass.o -lresolv
ld: Undefined symbol
   _herror
*** Error code 2
make: Fatal error: Command failed for target `ftp'

The only place herror() appears is in ftp.c:

        hp = gethostbyname(host);
        if (hp == NULL) {
                fprintf(stderr, "ftp: %s: ", host);
      ==>       herror((char *)NULL);
                code = -1;
                return((char *) 0);
        }

It's not terribly obvious from the context what herror() does.  On my system,
a Sun 4 running SunOS 4.1, there is no herror() (that I've found), nor does
it seem to be included with 4.3BSD.  So, before I punt and just comment the
reference out, does anyone know what herror() does?

Please reply by email; I'll post a summary if asked.  Thanks in advance.

Tim
--
Tim Ramsey (tar at hilbert.math.ksu.edu)
Dept. of Mathematics, Kansas State University, Manhattan KS 66506
Phone: (913) 532-6750 (voice) 2-7004 (FAX)



More information about the Comp.sources.bugs mailing list