Mercurial > gnulib
changeset 16922:937fc0f34278
tmpfile, clean-temp: Fix invocation of GetVersionEx.
* lib/tmpfile.c (supports_delete_on_close): Initialize parameter for
GetVersionEx correctly.
* lib/clean-temp.c (supports_delete_on_close): Likewise.
author | John Darrington <john@darrington.wattle.id.au> |
---|---|
date | Wed, 20 Jun 2012 23:30:48 +0200 |
parents | f243ccee7232 |
children | 0bce099a6479 |
files | ChangeLog lib/clean-temp.c lib/tmpfile.c |
diffstat | 3 files changed, 17 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog Wed Jun 20 22:51:06 2012 +0200 +++ b/ChangeLog Wed Jun 20 23:30:48 2012 +0200 @@ -1,3 +1,10 @@ +2012-06-20 John Darrington <john@darrington.wattle.id.au> (tiny change) + + tmpfile, clean-temp: Fix invocation of GetVersionEx. + * lib/tmpfile.c (supports_delete_on_close): Initialize parameter for + GetVersionEx correctly. + * lib/clean-temp.c (supports_delete_on_close): Likewise. + 2012-06-20 Bruno Haible <bruno@clisp.org> fdopen: Allow implementations that don't reject invalid fd arguments.
--- a/lib/clean-temp.c Wed Jun 20 22:51:06 2012 +0200 +++ b/lib/clean-temp.c Wed Jun 20 23:30:48 2012 +0200 @@ -583,6 +583,11 @@ { OSVERSIONINFO v; + /* According to + <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx> + this structure must be initialised as follows: */ + v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (GetVersionEx (&v)) known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1); else
--- a/lib/tmpfile.c Wed Jun 20 22:51:06 2012 +0200 +++ b/lib/tmpfile.c Wed Jun 20 23:30:48 2012 +0200 @@ -54,6 +54,11 @@ { OSVERSIONINFO v; + /* According to + <http://msdn.microsoft.com/en-us/library/windows/desktop/ms724451(v=vs.85).aspx> + this structure must be initialised as follows: */ + v.dwOSVersionInfoSize = sizeof (OSVERSIONINFO); + if (GetVersionEx (&v)) known = (v.dwPlatformId == VER_PLATFORM_WIN32_NT ? 1 : -1); else