OSDN Git Service

2005-06-09 Daniel Berlin <dberlin@dberlin.org>
[pf3gnuchains/gcc-fork.git] / gcc / prefix.c
index 1d2eded..a6cab76 100644 (file)
@@ -1,5 +1,5 @@
 /* Utility to update paths from internal to external forms.
-   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004
+   Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -124,6 +124,10 @@ save_string (const char *s, int len)
 
 #if defined(_WIN32) && defined(ENABLE_WIN32_REGISTRY)
 
+#ifndef WIN32_REGISTRY_KEY
+# define WIN32_REGISTRY_KEY BASEVER
+#endif
+
 /* Look up "key" in the registry, as above.  */
 
 static char *
@@ -157,11 +161,11 @@ lookup_key (char *key)
   size = 32;
   dst = xmalloc (size);
 
-  res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
+  res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
   if (res == ERROR_MORE_DATA && type == REG_SZ)
     {
       dst = xrealloc (dst, size);
-      res = RegQueryValueExA (reg_key, key, 0, &type, dst, &size);
+      res = RegQueryValueExA (reg_key, key, 0, &type, (LPBYTE) dst, &size);
     }
 
   if (type != REG_SZ || res != ERROR_SUCCESS)