[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: CVS Feature Branch - Windows Build Broken - lib/xgethostname.c & Win
From: |
Mark D. Baushke |
Subject: |
Re: CVS Feature Branch - Windows Build Broken - lib/xgethostname.c & WinSock |
Date: |
Mon, 22 Nov 2004 12:02:36 -0800 |
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Conrad T. Pino <Conrad@pino.com> writes:
> The NetBSD man pages tell me file "unistd.h" is the standard
> header file for "gethostname" function.
>
> CVS has "windows-NT/unistd.h" file and I tried burying the
> "winsock.h" include there but with bad results see end of
> this message.
>
> Conrad
>
> > From: Mark D. Baushke
> >
> > Hi Conrad,
> >
> > I suspect the fix needs to be add the line:
> >
> > # include <winsock.h>
> >
> > to windows-NT/config.h.in.footer and config.h.in and config.h
> >
> > I could be wrong.
> >
> > -- Mark
>
> Index: windows-NT/unistd.h
> ===================================================================
> RCS file: /cvs/ccvs/windows-NT/unistd.h,v
> retrieving revision 1.3
> diff -u -p -r1.3 unistd.h
> --- windows-NT/unistd.h 6 Oct 2004 23:57:51 -0000 1.3
> +++ windows-NT/unistd.h 22 Nov 2004 18:16:02 -0000
> @@ -20,6 +20,7 @@
>
> #ifndef UNISTD_H
> #define UNISTD_H
> +#include <winsock.h>
>
> int chdir (const char *path);
> int close (int fd);
>
... too many errors related to winnt.h being included elided ...
It might be nice to understand why winsock.h and winnt.h do not play
well together...
Conrad T. Pino <Conrad@pino.com> writes:
> Hi Mark,
>
> The follow patch seems to work but it's definitely a hack and
> not a pretty one in my opinion.
>
> Conrad
>
> Index: windows-NT/unistd.h
> ===================================================================
> RCS file: /cvs/ccvs/windows-NT/unistd.h,v
> retrieving revision 1.3
> diff -u -p -r1.3 unistd.h
> --- windows-NT/unistd.h 6 Oct 2004 23:57:51 -0000 1.3
> +++ windows-NT/unistd.h 22 Nov 2004 18:31:51 -0000
> @@ -23,6 +23,7 @@
>
> int chdir (const char *path);
> int close (int fd);
> +int __stdcall gethostname (char * name, int namelen);
>
> #if 0 /* someday maybe these should be added here as well */
>
...many warnings about libcvs.lib problems elided...
...134 warnings for compiling cvsnt elided...
I agree that this is not really desirable.
I am hoping that the GNULIB folks will let us put the
#include <winsock.h>
into xgethostname.c as a solution.
-- Mark
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)
iD8DBQFBokXc3x41pRYZE/gRAjw9AJ9GKYAaBpxP4BRZr/GMx0eB7+MqhACfdtau
kdgeP8xrpo8ZTVZzXjvMMc0=
=C2ou
-----END PGP SIGNATURE-----