2007-08-01 Tor Lillqvist <tml@novell.com>
+ * glib/gutils.c (get_special_folder): Drop leftover use of a
+ union.
+
* glibconfig.h.win32.in: Update to match what configure produces.
2007-07-31 Matthias Clasen <mclasen@redhat.com>
static gchar *
get_special_folder (int csidl)
{
- union {
- char c[MAX_PATH+1];
- wchar_t wc[MAX_PATH+1];
- } path;
+ wchar_t path[MAX_PATH+1];
HRESULT hr;
LPITEMIDLIST pidl = NULL;
BOOL b;
hr = SHGetSpecialFolderLocation (NULL, csidl, &pidl);
if (hr == S_OK)
{
- b = SHGetPathFromIDListW (pidl, path.wc);
+ b = SHGetPathFromIDListW (pidl, path);
if (b)
- retval = g_utf16_to_utf8 (path.wc, -1, NULL, NULL, NULL);
+ retval = g_utf16_to_utf8 (path, -1, NULL, NULL, NULL);
CoTaskMemFree (pidl);
}
return retval;