Index: libgweather/weather.c
===================================================================
--- libgweather/weather.c	(revision 499)
+++ libgweather/weather.c	(working copy)
@@ -43,6 +43,17 @@
 #include "weather.h"
 #include "weather-priv.h"
 
+#ifdef G_OS_WIN32
+
+extern char *_libgweather_win32_get_locale_dir (void);
+
+#undef GNOMELOCALEDIR
+#define GNOMELOCALEDIR _libgweather_win32_get_locale_dir ()
+
+#define localtime_r(t,tmp) (localtime (t) ? ((*tmp) = *localtime (t), tmp) : NULL)
+
+#endif
+
 const char *
 gweather_gettext (const char *str)
 {
@@ -696,36 +707,36 @@
 }
 
 static const gchar *
-temperature_string (gfloat far, TempUnit to_unit, gboolean round)
+temperature_string (gfloat deg_F, TempUnit to_unit, gboolean roundp)
 {
     static gchar buf[100];
 
     switch (to_unit) {
     case TEMP_UNIT_FAHRENHEIT:
-	if (!round) {
+	if (!roundp) {
 	    /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\342\204\211 is the "DEGREE FAHRENHEIT" symbol) */
-	    g_snprintf (buf, sizeof (buf), _("%.1f \342\204\211"), far);
+	    g_snprintf (buf, sizeof (buf), _("%.1f \342\204\211"), deg_F);
 	} else {
 	    /* TRANSLATOR: This is the temperature in degrees Fahrenheit (\342\204\211 is the "DEGREE FAHRENHEIT" symbol) */
-	    g_snprintf (buf, sizeof (buf), _("%d \342\204\211"), (int)floor (far + 0.5));
+	    g_snprintf (buf, sizeof (buf), _("%d \342\204\211"), (int)floor (deg_F + 0.5));
 	}
 	break;
     case TEMP_UNIT_CENTIGRADE:
-	if (!round) {
+	if (!roundp) {
 	    /* TRANSLATOR: This is the temperature in degrees Celsius (\342\204\203 is the "DEGREE CELSIUS" symbol) */
-	    g_snprintf (buf, sizeof (buf), _("%.1f \342\204\203"), TEMP_F_TO_C (far));
+	    g_snprintf (buf, sizeof (buf), _("%.1f \342\204\203"), TEMP_F_TO_C (deg_F));
 	} else {
 	    /* TRANSLATOR: This is the temperature in degrees Celsius (\342\204\203 is the "DEGREE CELSIUS" symbol) */
-	    g_snprintf (buf, sizeof (buf), _("%d \342\204\203"), (int)floor (TEMP_F_TO_C (far) + 0.5));
+	    g_snprintf (buf, sizeof (buf), _("%d \342\204\203"), (int)floor (TEMP_F_TO_C (deg_F) + 0.5));
 	}
 	break;
     case TEMP_UNIT_KELVIN:
-	if (!round) {
+	if (!roundp) {
 	    /* TRANSLATOR: This is the temperature in kelvin */
-	    g_snprintf (buf, sizeof (buf), _("%.1f K"), TEMP_F_TO_K (far));
+	    g_snprintf (buf, sizeof (buf), _("%.1f K"), TEMP_F_TO_K (deg_F));
 	} else {
 	    /* TRANSLATOR: This is the temperature in kelvin */
-	    g_snprintf (buf, sizeof (buf), _("%d K"), (int)floor (TEMP_F_TO_K (far)));
+	    g_snprintf (buf, sizeof (buf), _("%d K"), (int)floor (TEMP_F_TO_K (deg_F)));
 	}
 	break;
 
Index: libgweather/weather-sun.c
===================================================================
--- libgweather/weather-sun.c	(revision 499)
+++ libgweather/weather-sun.c	(working copy)
@@ -37,6 +37,10 @@
 #define GWEATHER_I_KNOW_THIS_IS_UNSTABLE
 #include "weather-priv.h"
 
+#ifdef G_OS_WIN32
+#define localtime_r(t,tmp) (localtime (t) ? ((*tmp) = *localtime (t), tmp) : NULL)
+#endif
+
 #define EPOCH_TO_J2000(t)       (t - 946728000)
 #define MEAN_ECLIPTIC_LONGITUDE 280.46435
 #define PERIGEE_LONGITUDE       282.94719
Index: libgweather/gweather-timezone.c
===================================================================
--- libgweather/gweather-timezone.c	(revision 499)
+++ libgweather/gweather-timezone.c	(working copy)
@@ -45,6 +45,60 @@
 #define TZ_TTINFO_GMTOFF_OFFSET 0
 #define TZ_TTINFO_ISDST_OFFSET 4
 
+#ifdef G_OS_WIN32
+
+#include <windows.h>
+
+static HMODULE dll = NULL;
+
+BOOL WINAPI
+DllMain (HINSTANCE hinstDLL,
+	 DWORD     fdwReason,
+	 LPVOID    lpvReserved)
+{
+  if (fdwReason == DLL_PROCESS_ATTACH)
+      dll = hinstDLL;
+
+  return TRUE;
+}
+
+static char *
+get_win32_zoneinfo_dir (void)
+{
+    static char *retval = NULL;
+    char *root;
+
+    if (retval)
+	return retval;
+
+    root = g_win32_get_package_installation_directory_of_module (dll);
+    retval = g_build_filename (root, "share/zoneinfo", NULL);
+    g_free (root);
+
+    return retval;
+}
+
+char *
+_libgweather_win32_get_locale_dir (void)
+{
+    static char *retval = NULL;
+    char *root;
+
+    if (retval)
+	return retval;
+
+    root = g_win32_get_package_installation_directory_of_module (dll);
+    retval = g_build_filename (root, "share/locale", NULL);
+    g_free (root);
+
+    return retval;
+}
+
+#undef ZONEINFO_DIR
+#define ZONEINFO_DIR get_win32_zoneinfo_dir ()
+
+#endif
+
 static gboolean
 parse_tzdata (const char *tzname, time_t start, time_t end,
 	      int *offset, gboolean *has_dst, int *dst_offset)
Index: libgweather/weather-metar.c
===================================================================
--- libgweather/weather-metar.c	(revision 499)
+++ libgweather/weather-metar.c	(working copy)
@@ -30,6 +30,10 @@
 #include "weather-priv.h"
 
 
+#ifdef G_OS_WIN32
+#define localtime_r(t,tmp) (localtime (t) ? ((*tmp) = *localtime (t), tmp) : NULL)
+#endif
+
 enum {
     TIME_RE,
     WIND_RE,
