Merge branch 'master' of ssh://gnunet.org/gnunet
[oweals/gnunet.git] / src / fs / fs_getopt.c
index 12bc5c1ea8e32dada775094073ff7b7d2050864d..f78e311d3dcac58e9f226915fc9152baddec509a 100644 (file)
@@ -1,6 +1,6 @@
 /*
      This file is part of GNUnet.
-     Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 Christian Grothoff (and other contributing authors)
+     Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009 GNUnet e.V.
 
      GNUnet is free software; you can redistribute it and/or modify
      it under the terms of the GNU General Public License as published
@@ -76,7 +76,7 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
       /* remove the quotes, keep the '+' */
       val = GNUNET_malloc (slen - 1);
       val[0] = '+';
-      memcpy (&val[1], &value[2], slen - 3);
+      GNUNET_memcpy (&val[1], &value[2], slen - 3);
       val[slen - 2] = '\0';
     }
     else
@@ -92,7 +92,7 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
       /* remove the quotes, add a space */
       val = GNUNET_malloc (slen);
       val[0] = ' ';
-      memcpy (&val[1], &value[1], slen - 2);
+      GNUNET_memcpy (&val[1], &value[1], slen - 2);
       val[slen - 1] = '\0';
     }
     else
@@ -127,7 +127,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
                                const char *value)
 {
   struct GNUNET_CONTAINER_MetaData **mm = scls;
-#if HAVE_EXTRACTOR_H
+#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
   enum EXTRACTOR_MetaType type;
   const char *typename;
   const char *typename_i18n;
@@ -147,7 +147,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
    */
   /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/
   tmp = GNUNET_strdup (value);
-#if HAVE_EXTRACTOR_H
+#if HAVE_EXTRACTOR_H && HAVE_LIBEXTRACTOR
   type = EXTRACTOR_metatype_get_max ();
   while (type > 0)
   {