/* gethostn.c (rsxnt) -- Copyright (c) 1996-1997 Rainer Schnitker */

#include <rsxnt.h>
#include <rsxntso.h>

int __gethostname (char *name, int len)
{
    if (!_rsxnt_socket_inited)
        return _rsxnt_errno(ENETDOWN);

    if ((*wsa_gethostname) (name, len) == SOCKET_ERROR)
        return _rsxnt_socket_errno();
    else
        return 0;
}
