On 10/02/2009 02:08 AM, Bruno Haible wrote:
Hi Paolo,
@@ -42,15 +43,20 @@ uname (struct utsname *buf)
if (gethostname (buf->nodename, sizeof (buf->nodename))< 0)
strcpy (buf->nodename, "localhost");
- /* Determine major-major Windows version. */
- version.dwOSVersionInfoSize = si
Hi Paolo,
> @@ -42,15 +43,20 @@ uname (struct utsname *buf)
>if (gethostname (buf->nodename, sizeof (buf->nodename)) < 0)
> strcpy (buf->nodename, "localhost");
>
> - /* Determine major-major Windows version. */
> - version.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
> - have_vers
Paolo Bonzini wrote:
> +#include
> + assert (have_version);
No assert please. The code which is used by end users should have the same
safety built-in than code used by developers. I therefore much prefer code
that always verifies the assertions and calls abort() (optionally with an
error m
This first uname cleanup switches to ANSI functions, and moves all
GetVersionEx (now GetVersionExA) calls to the beginning of the function.
This way, the calls can share one struct (OSVERSIONINFOEXA begins with
the same fields that are in OSVERSIONINFOA).
It temporarily asserts that Windows NT can