seaspider fixes
authorChristian Grothoff <christian@grothoff.org>
Mon, 8 Nov 2010 14:47:06 +0000 (14:47 +0000)
committerChristian Grothoff <christian@grothoff.org>
Mon, 8 Nov 2010 14:47:06 +0000 (14:47 +0000)
src/fs/fs_getopt.c
src/fs/fs_uri.c
src/util/client.c
src/util/os_priority.c

index edabcd06cb0c150fd52f3a95537868ae3a888843..0db7237f7357d677d649272c0e808ee781af6bf3 100644 (file)
@@ -144,13 +144,13 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext*
       *mm = meta;
     }
 
-  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
 #if ENABLE_NLS
-                               nl_langinfo (CODESET)
+  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
+                               nl_langinfo (CODESET));
 #else
-                               "utf-8"
+  tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value),
+                               "utf-8");
 #endif
-    );
   type = EXTRACTOR_metatype_get_max ();
   while (type > 0)
     {
index 764a2bee3efbfafc753e3cb528a8a4dfb5b498b2..788f606859910bbfc9cedc6ed85c2ef0066ddba9 100644 (file)
@@ -240,6 +240,7 @@ percent_decode_keyword (const char *in, char **emsg)
   return ret;
 }
 
+#define GNUNET_FS_URI_KSK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX
 
 /**
  * Parse a KSK URI.
@@ -263,9 +264,9 @@ uri_ksk_parse (const char *s, char **emsg)
 
   GNUNET_assert (s != NULL);
   slen = strlen (s);
-  pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX);
+  pos = strlen (GNUNET_FS_URI_KSK_PREFIX);
   if ( (slen <= pos) ||
-       (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_KSK_INFIX, 
+       (0 != strncmp (s, GNUNET_FS_URI_KSK_PREFIX,
                      pos) ) )
     return NULL;       /* not KSK URI */
   if ( (s[slen - 1] == '+') ||
@@ -337,6 +338,8 @@ CLEANUP:
 }
 
 
+#define GNUNET_FS_URI_SKS_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX
+
 /**
  * Parse an SKS URI.
  *
@@ -356,9 +359,9 @@ uri_sks_parse (const char *s, char **emsg)
 
   GNUNET_assert (s != NULL);
   slen = strlen (s);
-  pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX);
+  pos = strlen ( GNUNET_FS_URI_SKS_PREFIX);
   if ( (slen <= pos) ||
-       (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_SKS_INFIX, 
+       (0 != strncmp (s, GNUNET_FS_URI_SKS_PREFIX,
                      pos) ) )
     return NULL; /* not an SKS URI */
   if ( (slen < pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded)) ||
@@ -382,6 +385,8 @@ uri_sks_parse (const char *s, char **emsg)
   return ret;
 }
 
+#define GNUNET_FS_URI_CHK_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX
+
 
 /**
  * Parse a CHK URI.
@@ -404,9 +409,9 @@ uri_chk_parse (const char *s, char **emsg)
   GNUNET_assert (s != NULL);
 
   slen = strlen (s);
-  pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX);
+  pos = strlen (GNUNET_FS_URI_CHK_PREFIX);
   if ( (slen < pos + 2 * sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + 1) ||
-       (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_CHK_INFIX, 
+       (0 != strncmp (s,  GNUNET_FS_URI_CHK_PREFIX, 
                      pos) ) )
     return NULL; /* not a CHK URI */
   if ( (s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1] != '.') ||
@@ -527,6 +532,8 @@ struct LocUriAssembly
 };
 
 
+#define GNUNET_FS_URI_LOC_PREFIX GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX
+
 /**
  * Parse a LOC URI.
  * Also verifies validity of the location URI.
@@ -553,9 +560,9 @@ uri_loc_parse (const char *s, char **emsg)
 
   GNUNET_assert (s != NULL);
   slen = strlen (s);
-  pos = strlen (GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX);
+  pos = strlen ( GNUNET_FS_URI_LOC_PREFIX);
   if ( (slen < pos + 2 * sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) + 1) ||
-       (0 != strncmp (s, GNUNET_FS_URI_PREFIX GNUNET_FS_URI_LOC_INFIX, 
+       (0 != strncmp (s,  GNUNET_FS_URI_LOC_PREFIX,
                      pos) ) )
     return NULL; /* not an SKS URI */
   if ( (s[pos + sizeof (struct GNUNET_CRYPTO_HashAsciiEncoded) - 1] != '.') ||
index 171e9e957bb8d87146b3c6f2e5297d8b5779a93c..d957dd00a5d4f39c5ef05fe1fe4e0018f2dba1aa 100644 (file)
@@ -253,7 +253,6 @@ struct GNUNET_CLIENT_Connection
 
 };
 
-
 /**
  * Try to connect to the service.
  *
index 870ce28eab46291be5fa4b8f80d476134c0d1b07..fb6c2922c6e91eba4409c0267b017c84c430902e 100644 (file)
@@ -129,11 +129,16 @@ GNUNET_OS_process_close (struct GNUNET_OS_Process *proc)
 
 extern GNUNET_SIGNAL_Handler w32_sigchld_handler;
 
+/**
+ * Make seaspider happy.
+ */
+#define DWORD_WINAPI DWORD WINAPI
+
 /**
  * @brief Waits for a process to terminate and invokes the SIGCHLD handler
  * @param proc pointer to process structure
  */
-static DWORD WINAPI
+static DWORD_WINAPI
 ChildWaitThread (void *arg)
 {
   struct GNUNET_OS_Process *proc = (struct GNUNET_OS_Process *) arg;