Module: wine Branch: master Commit: 43a072b1cbf30ec3fbea605ee73d4559afe9b436 URL: http://source.winehq.org/git/wine.git/?a=commit;h=43a072b1cbf30ec3fbea605ee7...
Author: Dmitry Timoshkov dmitry@codeweavers.com Date: Mon Jul 30 21:23:03 2007 +0900
winecfg: Fix some compatibility problems.
---
programs/winecfg/drive.c | 8 ++++---- programs/winecfg/libraries.c | 1 + programs/winecfg/theme.c | 10 ++++++++++ programs/winecfg/winecfg.c | 16 ++++++++-------- 4 files changed, 23 insertions(+), 12 deletions(-)
diff --git a/programs/winecfg/drive.c b/programs/winecfg/drive.c index 69b5699..dd3befd 100644 --- a/programs/winecfg/drive.c +++ b/programs/winecfg/drive.c @@ -168,10 +168,10 @@ static DWORD get_drive_type( char letter ) if (!RegQueryValueExA( hKey, driveValue, NULL, NULL, (LPBYTE)buffer, &size )) { WINE_TRACE("Got type '%s' for %s\n", buffer, driveValue ); - if (!strcasecmp( buffer, "hd" )) ret = DRIVE_FIXED; - else if (!strcasecmp( buffer, "network" )) ret = DRIVE_REMOTE; - else if (!strcasecmp( buffer, "floppy" )) ret = DRIVE_REMOVABLE; - else if (!strcasecmp( buffer, "cdrom" )) ret = DRIVE_CDROM; + if (!lstrcmpi( buffer, "hd" )) ret = DRIVE_FIXED; + else if (!lstrcmpi( buffer, "network" )) ret = DRIVE_REMOTE; + else if (!lstrcmpi( buffer, "floppy" )) ret = DRIVE_REMOVABLE; + else if (!lstrcmpi( buffer, "cdrom" )) ret = DRIVE_CDROM; } RegCloseKey(hKey); } diff --git a/programs/winecfg/libraries.c b/programs/winecfg/libraries.c index 78f694b..8e4e46b 100644 --- a/programs/winecfg/libraries.c +++ b/programs/winecfg/libraries.c @@ -21,6 +21,7 @@ */
#include "config.h" +#include "wine/port.h"
#define NONAMELESSUNION #define WIN32_LEAN_AND_MEAN diff --git a/programs/winecfg/theme.c b/programs/winecfg/theme.c index ee18840..4380eae 100644 --- a/programs/winecfg/theme.c +++ b/programs/winecfg/theme.c @@ -22,11 +22,21 @@ * */
+#include "config.h" +#include "wine/port.h" + #include <stdarg.h> #include <stdlib.h> #include <stdio.h> +#ifdef HAVE_SYS_STAT_H #include <sys/stat.h> +#endif +#ifdef HAVE_UNISTD_H #include <unistd.h> +#endif +#ifdef HAVE_DIRECT_H +#include <direct.h> +#endif
#define COBJMACROS
diff --git a/programs/winecfg/winecfg.c b/programs/winecfg/winecfg.c index 42f03fb..0aa051b 100644 --- a/programs/winecfg/winecfg.c +++ b/programs/winecfg/winecfg.c @@ -317,9 +317,9 @@ char *get_reg_key(HKEY root, const char *path, const char *name, const char *def s = LIST_ENTRY(cursor, struct setting, entry);
if (root != s->root) continue; - if (strcasecmp(path, s->path) != 0) continue; + if (lstrcmpi(path, s->path) != 0) continue; if (!s->name) continue; - if (strcasecmp(name, s->name) != 0) continue; + if (lstrcmpi(name, s->name) != 0) continue;
WINE_TRACE("found %s:%s in settings list, returning %s\n", path, name, s->value); return s->value ? strdupA(s->value) : NULL; @@ -363,8 +363,8 @@ static void set_reg_key_ex(HKEY root, const char *path, const char *name, const struct setting *s = LIST_ENTRY(cursor, struct setting, entry);
if (root != s->root) continue; - if (strcasecmp(s->path, path) != 0) continue; - if ((s->name && name) && strcasecmp(s->name, name) != 0) continue; + if (lstrcmpi(s->path, path) != 0) continue; + if ((s->name && name) && lstrcmpi(s->name, name) != 0) continue;
/* are we attempting a double delete? */ if (!s->name && !name) return; @@ -463,8 +463,8 @@ char **enumerate_values(HKEY root, char *path) LIST_FOR_EACH( cursor, settings ) { struct setting *s = LIST_ENTRY(cursor, struct setting, entry); - if (strcasecmp(s->path, path) != 0) continue; - if (strcasecmp(s->name, name) != 0) continue; + if (lstrcmpi(s->path, path) != 0) continue; + if (lstrcmpi(s->name, name) != 0) continue;
if (!s->value) { @@ -503,13 +503,13 @@ char **enumerate_values(HKEY root, char *path) struct setting *setting = LIST_ENTRY(cursor, struct setting, entry); BOOL found = FALSE;
- if (strcasecmp(setting->path, path) != 0) continue; + if (lstrcmpi(setting->path, path) != 0) continue;
if (!setting->value) continue;
for (i = 0; i < valueslen; i++) { - if (strcasecmp(setting->name, values[i]) == 0) + if (lstrcmpi(setting->name, values[i]) == 0) { found = TRUE; break;