bug-coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: bug in hostname


From: Bruno Haible
Subject: Re: bug in hostname
Date: Sun, 18 Jan 2004 18:19:20 +0100
User-agent: KMail/1.5

Jim Meyering wrote:
> > Jim, maybe it would be an idea to merge this program with the 'hostname'
> > from coreutils. What's your stand on it?
>
> Good idea.
> I'd welcome the addition.

That means that you want me to do the work, I guess? OK, here's the program,
consisting of
  - a patch to lib/gethostname.c to add Woe32 support,
  - a new src/hostname.c,
  - some autoconf macros that you can add to configure.ac or where it fits.

If that's OK, I can also go out and write the documentation update.


2004-01-18  Bruno Haible  <address@hidden>

        * gethostname.c: Add support for Windows. Include <string.h>.
        (gethostname): On Windows, use GetComputerName().

2004-01-18  Bruno Haible  <address@hidden>

        * hostname.c: Include getopt.h, not long-options.h.
        Include headers for using IPv6. Include xgethostname.h.
        (xgethostname): Remove declaration.
        (AUTHORS): Add me.
        (format): New variable.
        (ipv4_ntop, ipv6_ntop): New macros.
        (print_hostname): New function.
        (sethostname): Provide a fallback definition that just signals an
        error.
        (long_options): New variable.
        (usage): Document new options -s, -f, -i, -h, -V.
        (main): Use getopt_long instead of parse_long_options. Initialize
        'format'. Invoke print_hostname.

Attachment: gethostname-patch
Description: Text Data

Attachment: hostname-patch
Description: Text Data

Attachment: added-autoconf-stuff
Description: Text Data


reply via email to

[Prev in Thread] Current Thread [Next in Thread]