Returns now GNUNET_SYSERR
[oweals/gnunet.git] / src / util / strings.c
index 1f7f45d5192504cb27e3b0812d9d3d78da24673a..fa445f69423c3b0bcfde1fe799e910433e05b82e 100644 (file)
@@ -199,7 +199,7 @@ GNUNET_STRINGS_to_utf8 (const char *input, size_t len, const char *charset)
   itmp = tmp;
   finSize = tmpSize;
   if (iconv (cd,
-#if FREEBSD || DARWIN
+#if FREEBSD || DARWIN || WINDOWS
              (const char **) &input,
 #else
              (char **) &input,
@@ -361,9 +361,9 @@ GNUNET_STRINGS_relative_time_to_string (struct GNUNET_TIME_Relative delta)
 {
   const char *unit = _( /* time unit */ "ms");
   char *ret;
-  uint64_t dval = delta.value;
+  uint64_t dval = delta.rel_value;
 
-  if (delta.value == GNUNET_TIME_UNIT_FOREVER_REL.value)
+  if (delta.rel_value == GNUNET_TIME_UNIT_FOREVER_REL.rel_value)
     return GNUNET_strdup (_("eternity"));
   if (dval > 5 * 1000)
     {
@@ -403,9 +403,9 @@ GNUNET_STRINGS_absolute_time_to_string (struct GNUNET_TIME_Absolute t)
   time_t tt;
   char *ret;
 
-  if (t.value == GNUNET_TIME_UNIT_FOREVER_ABS.value)
+  if (t.abs_value == GNUNET_TIME_UNIT_FOREVER_ABS.abs_value)
     return GNUNET_strdup (_("end of time"));
-  tt = t.value / 1000;
+  tt = t.abs_value / 1000;
 #ifdef ctime_r
   ret = ctime_r (&tt, GNUNET_malloc (32));
 #else