+2003-01-10 Corinna Vinschen <corinna@vinschen.de>
+
+ * autoload.cc (gethostname): Make call optional, return 1 if function
+ can't get loaded.
+ * net.cc (cygwin_gethostname): Call GetComputerName if return value
+ of gethostname is non-zero.
+
2003-01-10 Charles Wilson <cwilson@ece.gatech.edu>
* cygwin.din: add asprintf and vasprintf, as well as the reentrant
LoadDLLfunc (connect, 12, wsock32)
LoadDLLfunc (gethostbyaddr, 12, wsock32)
LoadDLLfunc (gethostbyname, 4, wsock32)
-LoadDLLfunc (gethostname, 8, wsock32)
+LoadDLLfuncEx2 (gethostname, 8, wsock32, 1, 1)
LoadDLLfunc (getpeername, 12, wsock32)
LoadDLLfunc (getprotobyname, 4, wsock32)
LoadDLLfunc (getprotobynumber, 4, wsock32)
if (__check_null_invalid_struct_errno (name, len))
return -1;
- if (gethostname (name, len) == SOCKET_ERROR)
+ if (gethostname (name, len))
{
DWORD local_len = len;