Mail Archives: cygwin-developers/1998/08/20/06:59:26
On Thu, Aug 20, 1998 at 12:03:34PM +0200, Corinna Vinschen wrote:
>IMHO, the implementation of the function 'gethostname()' is worse than
>nothing, because the name, returned by 'GetComputerName()' may not be
>the same name as returned by the wsock-function 'gethostname()'. I
>have patched it at home, but I havn't sent the patch, because I haven't
>realized the 'deep sense' of the official version (W95?). Sergey
>Okhapkin has written to me 'TCP/IP may be not installed'. Does anybody
>need 'gethostname()' if he/she doesn't have installed TCP/IP????
That's an impossible question to answer. I certainly assume that it is
possible.
Maybe the "correct" way to do this is to use winsock gethostname and if
that fails or returns an empty string, default to GetComputerName().
>Now the patch:
Once we receive the assignment form, I'd appreciate it if you'd provide
us with a full diff -cp again so that there is no confusion.
Thanks,
-chris
- Raw text -