lib/canon-host.c


Log

Author Commit Date CI Message
Paul Eggert ba6b2865 2006-09-27T18:25:47 * canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0 getaddrinfo.
Paul Eggert 0632e115 2006-09-13T22:38:14 * _fpending.c: Include <config.h> unconditionally, since we no longer worry about uses that don't define HAVE_CONFIG_H. * acl.c, alloca.c, argmatch.c, atexit.c, backupfile.c: * basename.c, c-stack.c, c-strtod.c, calloc.c, canon-host.c: * canonicalize.c, chdir-long.c, chdir-safer.c, chown.c: * cloexec.c, close-stream.c, closeout.c, creat-safer.c: * cycle-check.c, diacrit.c, dirchownmod.c, dirfd.c, dirname.c: * dup-safer.c, dup2.c, error.c, euidaccess.c, exclude.c: * exitfail.c, fchmodat.c, fchown-stub.c, fd-safer.c: * file-type.c, fileblocks.c, filemode.c, filenamecat.c: * fnmatch.c, fopen-safer.c, fprintftime.c, free.c, fsusage.c: * ftruncate.c, fts-cycle.c, fts.c, full-write.c, gai_strerror.c: * getcwd.c, getdate.y, getdomainname.c, getgroups.c: * gethostname.c, gethrxtime.c, getloadavg.c, getlogin_r.c: * getndelim2.c, getnline.c, getopt.c, getopt1.c, getpass.c: * gettime.c, gettimeofday.c, getugroups.c, getusershell.c: * glob.c, group-member.c, hard-locale.c, hash-pjw.c, hash.c: * human.c, idcache.c, inet_ntop.c, inet_pton.c, inttostr.c: * isdir.c, lchown.c, linebuffer.c, long-options.c, lstat.c: * malloc.c, md5.c, memcasecmp.c, memchr.c, memcmp.c, memcoll.c: * memcpy.c, memmove.c, memrchr.c, mkancesdirs.c, mkdir-p.c: * mkdir.c, mkdirat.c, mkstemp-safer.c, mkstemp.c, modechange.c: * mountlist.c, nanosleep.c, obstack.c, open-safer.c: * openat-die.c, openat.c, pagealign_alloc.c, physmem.c: * pipe-safer.c, posixtm.c, posixver.c, putenv.c, quote.c: * quotearg.c, raise.c, readtokens.c, readtokens0.c, readutmp.c: * realloc.c, regex.c, rename.c, rmdir.c, rpmatch.c, safe-read.c: * same.c, save-cwd.c, savedir.c, setenv.c, settime.c, sha1.c: * sig2str.c, snprintf.c, strdup.c, strerror.c, strftime.c: * stripslash.c, strndup.c, strnlen.c, strpbrk.c, strtod.c: * strtoimax.c, strtol.c, strverscmp.c, tempname.c, time_r.c: * timegm.c, tmpfile-safer.c, unlinkdir.c, userspec.c, utime.c: * utimecmp.c, utimens.c, version-etc-fsf.c, version-etc.c: * xalloc-die.c, xgetcwd.c, xgethostname.c, xmalloc.c: * xmemcoll.c, xnanosleep.c, xreadlink.c, xstrtod.c: * xstrtoimax.c, xstrtol.c, xstrtoumax.c, yesno.c: Likewise.
Derek R. Price 639a9c73 2005-09-13T13:23:57 * canon-host.c (canon_host_r): Set *cherror on memory allocation failure. Reported by Jim Meyering <jim@meyering.net>.
Jim Meyering a4eb4138 2005-09-13T12:37:48 Filter through gnu indent and reword comments slightly.
Derek R. Price 244d36cf 2005-09-13T04:15:15 * modules/canon-host: Add canon-host.h. Depend on getaddrinfo. Make LGPL. * modules/getaddrinfo: Add link to opengroup spec. Depend on strdup. Make canon-host require getaddrinfo. * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies. AC_LIBSOURCE canon-host.h. Call... (gl_PREREQ_CANON_HOST): ...this new function, which requires gl_GETADDRINFO. * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed. Return usable errors from canon-host. * lib/canon-host.h: New file. * lib/canon-host.c (canon_host): Wrap... (canon_host_r): ...this new function, which now relies exclusively on getaddrinfo. (ch_strerror): New function. (last_cherror): New global. * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test interface. (getaddrinfo): Add AI_CANONNAME functionality. Don't do arithmetic on void *. (freeaddrinfo): Free ai->ai_canonname when set.
Paul Eggert 08eec9e6 2005-06-24T17:30:33 * canon-host.c (canon-host): Append trailing "," to 0 in initializer of struct addrinfo, as an indication that we don't care how many members the structure has.
Paul Eggert 267a39ba 2005-05-14T06:03:57 *** empty log message ***
Paul Eggert 8b41ecf7 2004-11-17T07:18:27 Import from coreutils.
Paul Eggert b3b80cca 2003-09-08T23:18:35 Remove K&R cruft.
Bruno Haible d066717a 2002-12-17T11:48:11 Remove unused declaration.
Jim Meyering 011f3dd8 2000-06-21T13:00:49 (canon_host): Use malloc and memcpy to copy an address, not strdup. Include <stdlib.h> and don't declare free().
Jim Meyering eeedc1da 2000-04-29T09:25:09 Declare strdup only if it's not defined.
Jim Meyering 968fbdf8 2000-04-05T14:57:36 (canon_host): Declare strdup. Required for ultrix4.3.
Jim Meyering 47dfd672 1999-03-10T15:39:02 (canon_host): Don't use he->h_addr directly. Based on a patch from Savochkin Andrey Vladimirovich.
Jim Meyering eef6a0f2 1999-01-11T02:46:33 (main) [TEST_CANON_HOST]: Add a simple test driver.
Jim Meyering ea12910c 1999-01-07T03:43:01 protoize
Jim Meyering d752aba7 1996-11-03T20:59:43 Include sys/types.h for the definitions (otherwise missing on some systems) of caddr_t (used by sys/socket.h) and ushort (used by netinet/in.h). From Karl Heuer.
Jim Meyering 783c1624 1996-07-15T03:56:06 indent cpp-directives
Jim Meyering 5d08444e 1996-07-15T03:43:36 update FSF address in copyright
Jim Meyering bbe5687e 1996-02-23T16:14:27 [HAVE_SYS_SOCKET_H]: Include <sys/socket.h> for definition of AF_INET on at least SunOS 4.
Jim Meyering 96d1a464 1996-02-13T05:28:38 Be careful to always return something.
Jim Meyering 50e77338 1996-02-04T13:22:22 (canon_host): Cast returned he->h_name to char*.
Jim Meyering 7f81c241 1996-02-04T12:47:33 .