aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--README6
-rw-r--r--configure.ac23
-rw-r--r--po/POTFILES.in4
-rw-r--r--src/fs/Makefile.am64
-rw-r--r--src/fs/fs_file_information.c2
-rw-r--r--src/fs/fs_getopt.c15
-rw-r--r--src/fs/gnunet-directory.c21
-rw-r--r--src/fs/gnunet-helper-fs-publish.c35
-rw-r--r--src/fs/gnunet-publish.c4
-rw-r--r--src/fs/gnunet-search.c6
-rw-r--r--src/fs/test_fs_directory.c8
-rw-r--r--src/include/Makefile.am3
-rw-r--r--src/include/gnunet_configuration_lib.h1
-rw-r--r--src/include/gnunet_container_lib.h94
-rw-r--r--src/include/gnunet_crypto_lib.h6
-rw-r--r--src/include/gnunet_util_taler_wallet_lib.h1
-rw-r--r--src/util/Makefile.am3
-rw-r--r--src/util/common_allocation.c2
-rw-r--r--src/util/common_endian.c2
-rw-r--r--src/util/common_logging.c10
-rw-r--r--src/util/configuration.c5
-rw-r--r--src/util/container_heap.c2
-rw-r--r--src/util/container_meta_data.c9
-rw-r--r--src/util/container_multihashmap.c2
-rw-r--r--src/util/container_multihashmap32.c2
-rw-r--r--src/util/crypto_crc.c2
-rw-r--r--src/util/crypto_ecc.c3
-rw-r--r--src/util/crypto_hash.c3
-rw-r--r--src/util/crypto_mpi.c2
-rw-r--r--src/util/crypto_random.c2
-rw-r--r--src/util/crypto_rsa.c8
-rw-r--r--src/util/crypto_symmetric.c2
-rw-r--r--src/util/disk.c3
-rw-r--r--src/util/disk.h3
-rw-r--r--src/util/strings.c3
-rw-r--r--src/util/test_container_meta_data.c14
-rw-r--r--src/util/time.c3
37 files changed, 301 insertions, 77 deletions
diff --git a/README b/README
index 98d77b907..ffc06b687 100644
--- a/README
+++ b/README
@@ -28,14 +28,13 @@ packages. Hence please make sure to use the versions listed below.
28 28
29These are the direct dependencies for running GNUnet: 29These are the direct dependencies for running GNUnet:
30 30
31- libextractor >= 0.6.1 31- libmicrohttpd >= 0.9.40
32- libmicrohttpd >= 0.9.33
33- libgcrypt >= 1.6 32- libgcrypt >= 1.6
34- libgnurl >= 7.35.0 (available from https://gnunet.org/gnurl) 33- libgnurl >= 7.35.0 (available from https://gnunet.org/gnurl)
35- libunistring >= 0.9.2 34- libunistring >= 0.9.2
36- gnutls >= 3.2.12 35- gnutls >= 3.2.12
37- libidn >= 1.0 36- libidn >= 1.0
38- libglpk >= 4.45 37- libextractor >= 0.6.1 (highly recommended)
39- openssl >= 1.0 (binary, used to generate X.509 certificate) 38- openssl >= 1.0 (binary, used to generate X.509 certificate)
40- libltdl >= 2.2 (part of GNU libtool) 39- libltdl >= 2.2 (part of GNU libtool)
41- sqlite >= 3.8 (default database, required) 40- sqlite >= 3.8 (default database, required)
@@ -46,6 +45,7 @@ These are the direct dependencies for running GNUnet:
46- libogg >= 1.3.0 (optional for experimental conversation tool) 45- libogg >= 1.3.0 (optional for experimental conversation tool)
47- python-zbar >= 0.10 (optional for gnunet-qr) 46- python-zbar >= 0.10 (optional for gnunet-qr)
48- TeX Live >= 2012 (optional for gnunet-bcd) 47- TeX Live >= 2012 (optional for gnunet-bcd)
48- libglpk >= 4.45 (optional for experimental code)
49 49
50Recommended autotools for compiling the SVN version are: 50Recommended autotools for compiling the SVN version are:
51- autoconf >= 2.59 51- autoconf >= 2.59
diff --git a/configure.ac b/configure.ac
index 039652b78..ebbb69465 100644
--- a/configure.ac
+++ b/configure.ac
@@ -557,11 +557,6 @@ AC_ARG_ENABLE([taler-wallet],
557AC_MSG_RESULT($taler_only) 557AC_MSG_RESULT($taler_only)
558AM_CONDITIONAL([TALER_ONLY], [test "x$taler_only" = "xyes"]) 558AM_CONDITIONAL([TALER_ONLY], [test "x$taler_only" = "xyes"])
559 559
560if test "$taler_only" != yes
561then
562
563
564
565# test for libextractor 560# test for libextractor
566extractor=0 561extractor=0
567AC_MSG_CHECKING(for libextractor) 562AC_MSG_CHECKING(for libextractor)
@@ -590,14 +585,22 @@ AC_ARG_WITH(extractor,
590 AC_CHECK_HEADERS(extractor.h, 585 AC_CHECK_HEADERS(extractor.h,
591 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults], 586 AC_CHECK_LIB([extractor], [EXTRACTOR_plugin_add_defaults],
592 extractor=1))]) 587 extractor=1))])
588# restore LIBS
589LIBS=$SAVE_LIBS
590
593if test "$extractor" != 1 591if test "$extractor" != 1
594then 592then
595 AC_MSG_ERROR([GNUnet requires libextractor]) 593 AM_CONDITIONAL(HAVE_LIBEXTRACTOR, false)
594 AC_DEFINE([HAVE_LIBEXTRACTOR],[0],[Lacking libextractor])
595else
596 AM_CONDITIONAL(HAVE_LIBEXTRACTOR, true)
597 AC_DEFINE([HAVE_LIBEXTRACTOR],[1],[Have libextractor])
596fi 598fi
597# restore LIBS
598LIBS=$SAVE_LIBS
599 599
600 600
601if test "$taler_only" != yes
602then
603
601# Check for libltdl header (#2999) 604# Check for libltdl header (#2999)
602ltdl=0 605ltdl=0
603AC_MSG_CHECKING(for libltdl) 606AC_MSG_CHECKING(for libltdl)
@@ -1674,6 +1677,10 @@ then
1674 fi 1677 fi
1675fi 1678fi
1676 1679
1680if test "$extractor" != 1
1681then
1682 AC_MSG_WARN([NOTICE: libextractor not found, but various file-sharing functions require it])
1683fi
1677 1684
1678AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres]) 1685AC_MSG_NOTICE([NOTICE: Database support is set to MySQL: $mysql, SQLite: $sqlite, Postgres: $postgres])
1679 1686
diff --git a/po/POTFILES.in b/po/POTFILES.in
index b350ea996..34bdaedd8 100644
--- a/po/POTFILES.in
+++ b/po/POTFILES.in
@@ -391,6 +391,7 @@ src/util/common_allocation.c
391src/util/common_endian.c 391src/util/common_endian.c
392src/util/common_logging.c 392src/util/common_logging.c
393src/util/configuration.c 393src/util/configuration.c
394src/util/configuration_loader.c
394src/util/connection.c 395src/util/connection.c
395src/util/container_bloomfilter.c 396src/util/container_bloomfilter.c
396src/util/container_heap.c 397src/util/container_heap.c
@@ -400,7 +401,9 @@ src/util/container_multihashmap.c
400src/util/container_multipeermap.c 401src/util/container_multipeermap.c
401src/util/crypto_crc.c 402src/util/crypto_crc.c
402src/util/crypto_ecc.c 403src/util/crypto_ecc.c
404src/util/crypto_ecc_setup.c
403src/util/crypto_hash.c 405src/util/crypto_hash.c
406src/util/crypto_hash_file.c
404src/util/crypto_hkdf.c 407src/util/crypto_hkdf.c
405src/util/crypto_kdf.c 408src/util/crypto_kdf.c
406src/util/crypto_mpi.c 409src/util/crypto_mpi.c
@@ -409,6 +412,7 @@ src/util/crypto_random.c
409src/util/crypto_rsa.c 412src/util/crypto_rsa.c
410src/util/crypto_symmetric.c 413src/util/crypto_symmetric.c
411src/util/disk.c 414src/util/disk.c
415src/util/disk_iterator.c
412src/util/getopt.c 416src/util/getopt.c
413src/util/getopt_helpers.c 417src/util/getopt_helpers.c
414src/util/gnunet-config.c 418src/util/gnunet-config.c
diff --git a/src/fs/Makefile.am b/src/fs/Makefile.am
index 8ac42c18d..736339aab 100644
--- a/src/fs/Makefile.am
+++ b/src/fs/Makefile.am
@@ -51,7 +51,12 @@ libgnunetfs_la_SOURCES = \
51libgnunetfs_la_LIBADD = \ 51libgnunetfs_la_LIBADD = \
52 $(top_builddir)/src/datastore/libgnunetdatastore.la \ 52 $(top_builddir)/src/datastore/libgnunetdatastore.la \
53 $(top_builddir)/src/util/libgnunetutil.la \ 53 $(top_builddir)/src/util/libgnunetutil.la \
54 $(GN_LIBINTL) $(XLIB) $(LIBGCRYPT_LIBS) -lunistring -lextractor 54 $(GN_LIBINTL) $(XLIB) $(LIBGCRYPT_LIBS) -lunistring
55
56if HAVE_LIBEXTRACTOR
57libgnunetfs_la_LIBADD += \
58 -lextractor
59endif
55 60
56libgnunetfs_la_LDFLAGS = \ 61libgnunetfs_la_LDFLAGS = \
57 $(GN_LIB_LDFLAGS) $(WINFLAGS) \ 62 $(GN_LIB_LDFLAGS) $(WINFLAGS) \
@@ -92,9 +97,13 @@ gnunet_directory_SOURCES = \
92gnunet_directory_LDADD = \ 97gnunet_directory_LDADD = \
93 libgnunetfs.la \ 98 libgnunetfs.la \
94 $(top_builddir)/src/util/libgnunetutil.la \ 99 $(top_builddir)/src/util/libgnunetutil.la \
95 -lextractor \
96 $(GN_LIBINTL) 100 $(GN_LIBINTL)
97 101
102if HAVE_LIBEXTRACTOR
103gnunet_directory_LDADD += \
104 -lextractor
105endif
106
98gnunet_fs_profiler_SOURCES = \ 107gnunet_fs_profiler_SOURCES = \
99 gnunet-fs-profiler.c 108 gnunet-fs-profiler.c
100gnunet_fs_profiler_LDADD = \ 109gnunet_fs_profiler_LDADD = \
@@ -107,9 +116,13 @@ gnunet_fs_SOURCES = \
107gnunet_fs_LDADD = \ 116gnunet_fs_LDADD = \
108 libgnunetfs.la \ 117 libgnunetfs.la \
109 $(top_builddir)/src/util/libgnunetutil.la \ 118 $(top_builddir)/src/util/libgnunetutil.la \
110 -lextractor \
111 $(GN_LIBINTL) 119 $(GN_LIBINTL)
112 120
121if HAVE_LIBEXTRACTOR
122gnunet_fs_LDADD += \
123 -lextractor
124endif
125
113gnunet_download_SOURCES = \ 126gnunet_download_SOURCES = \
114 gnunet-download.c 127 gnunet-download.c
115gnunet_download_LDADD = \ 128gnunet_download_LDADD = \
@@ -123,31 +136,48 @@ gnunet_publish_LDADD = \
123 $(top_builddir)/src/identity/libgnunetidentity.la \ 136 $(top_builddir)/src/identity/libgnunetidentity.la \
124 libgnunetfs.la \ 137 libgnunetfs.la \
125 $(top_builddir)/src/util/libgnunetutil.la \ 138 $(top_builddir)/src/util/libgnunetutil.la \
126 -lextractor \
127 $(GN_LIBINTL) 139 $(GN_LIBINTL)
128 140
141if HAVE_LIBEXTRACTOR
142gnunet_publish_LDADD += \
143 -lextractor
144endif
145
129gnunet_auto_share_SOURCES = \ 146gnunet_auto_share_SOURCES = \
130 gnunet-auto-share.c 147 gnunet-auto-share.c
131gnunet_auto_share_LDADD = \ 148gnunet_auto_share_LDADD = \
132 $(top_builddir)/src/util/libgnunetutil.la \ 149 $(top_builddir)/src/util/libgnunetutil.la \
133 -lextractor \
134 $(GN_LIBINTL) 150 $(GN_LIBINTL)
135 151
152if HAVE_LIBEXTRACTOR
153gnunet_auto_share_LDADD += \
154 -lextractor
155endif
156
136gnunet_helper_fs_publish_SOURCES = \ 157gnunet_helper_fs_publish_SOURCES = \
137 gnunet-helper-fs-publish.c 158 gnunet-helper-fs-publish.c
138gnunet_helper_fs_publish_LDADD = \ 159gnunet_helper_fs_publish_LDADD = \
139 $(top_builddir)/src/util/libgnunetutil.la \ 160 $(top_builddir)/src/util/libgnunetutil.la \
140 -lextractor \
141 $(GN_LIBINTL) 161 $(GN_LIBINTL)
142 162
163if HAVE_LIBEXTRACTOR
164gnunet_helper_fs_publish_LDADD += \
165 -lextractor
166endif
167
143gnunet_search_SOURCES = \ 168gnunet_search_SOURCES = \
144 gnunet-search.c 169 gnunet-search.c
145gnunet_search_LDADD = \ 170gnunet_search_LDADD = \
146 libgnunetfs.la \ 171 libgnunetfs.la \
147 $(top_builddir)/src/util/libgnunetutil.la \ 172 $(top_builddir)/src/util/libgnunetutil.la \
148 -lextractor \
149 $(GN_LIBINTL) 173 $(GN_LIBINTL)
150 174
175if HAVE_LIBEXTRACTOR
176gnunet_search_LDADD += \
177 -lextractor
178endif
179
180
151gnunet_daemon_fsprofiler_SOURCES = \ 181gnunet_daemon_fsprofiler_SOURCES = \
152 gnunet-daemon-fsprofiler.c 182 gnunet-daemon-fsprofiler.c
153gnunet_daemon_fsprofiler_LDADD = \ 183gnunet_daemon_fsprofiler_LDADD = \
@@ -243,9 +273,13 @@ test_plugin_block_fs_LDADD = \
243 273
244if HAVE_PYTHON 274if HAVE_PYTHON
245check_SCRIPTS = \ 275check_SCRIPTS = \
246 test_gnunet_fs_psd.py \
247 test_gnunet_fs_rec.py \ 276 test_gnunet_fs_rec.py \
248 test_gnunet_fs_idx.py 277 test_gnunet_fs_idx.py
278
279if HAVE_LIBEXTRACTOR
280check_SCRIPTS += \
281 test_gnunet_fs_psd.py
282endif
249endif 283endif
250 284
251if ENABLE_MONKEY 285if ENABLE_MONKEY
@@ -289,10 +323,15 @@ endif
289test_fs_directory_SOURCES = \ 323test_fs_directory_SOURCES = \
290 test_fs_directory.c 324 test_fs_directory.c
291test_fs_directory_LDADD = \ 325test_fs_directory_LDADD = \
292 -lextractor \
293 libgnunetfs.la \ 326 libgnunetfs.la \
294 $(top_builddir)/src/util/libgnunetutil.la 327 $(top_builddir)/src/util/libgnunetutil.la
295 328
329if HAVE_LIBEXTRACTOR
330test_fs_directory_LDADD += \
331 -lextractor
332endif
333
334
296test_fs_download_SOURCES = \ 335test_fs_download_SOURCES = \
297 test_fs_download.c 336 test_fs_download.c
298test_fs_download_LDADD = \ 337test_fs_download_LDADD = \
@@ -324,10 +363,15 @@ test_fs_download_persistence_LDADD = \
324test_fs_file_information_SOURCES = \ 363test_fs_file_information_SOURCES = \
325 test_fs_file_information.c 364 test_fs_file_information.c
326test_fs_file_information_LDADD = \ 365test_fs_file_information_LDADD = \
327 -lextractor \
328 libgnunetfs.la \ 366 libgnunetfs.la \
329 $(top_builddir)/src/util/libgnunetutil.la 367 $(top_builddir)/src/util/libgnunetutil.la
330 368
369if HAVE_LIBEXTRACTOR
370test_fs_file_information_LDADD += \
371 -lextractor
372endif
373
374
331test_fs_getopt_SOURCES = \ 375test_fs_getopt_SOURCES = \
332 test_fs_getopt.c 376 test_fs_getopt.c
333test_fs_getopt_LDADD = \ 377test_fs_getopt_LDADD = \
diff --git a/src/fs/fs_file_information.c b/src/fs/fs_file_information.c
index ffe2d191d..b787ca8fd 100644
--- a/src/fs/fs_file_information.c
+++ b/src/fs/fs_file_information.c
@@ -24,7 +24,9 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#if HAVE_EXTRACTOR_H
27#include <extractor.h> 28#include <extractor.h>
29#endif
28#include "gnunet_fs_service.h" 30#include "gnunet_fs_service.h"
29#include "fs_api.h" 31#include "fs_api.h"
30#include "fs_tree.h" 32#include "fs_tree.h"
diff --git a/src/fs/fs_getopt.c b/src/fs/fs_getopt.c
index d2ee34a94..86fc9578c 100644
--- a/src/fs/fs_getopt.c
+++ b/src/fs/fs_getopt.c
@@ -118,17 +118,20 @@ GNUNET_FS_getopt_set_keywords (struct GNUNET_GETOPT_CommandLineProcessorContext
118 * @param scls must be of type "struct GNUNET_MetaData **" 118 * @param scls must be of type "struct GNUNET_MetaData **"
119 * @param option name of the option (typically 'k') 119 * @param option name of the option (typically 'k')
120 * @param value command line argument given 120 * @param value command line argument given
121 * @return GNUNET_OK on success 121 * @return #GNUNET_OK on success
122 */ 122 */
123int 123int
124GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext 124GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext *ctx,
125 *ctx, void *scls, const char *option, 125 void *scls,
126 const char *option,
126 const char *value) 127 const char *value)
127{ 128{
128 struct GNUNET_CONTAINER_MetaData **mm = scls; 129 struct GNUNET_CONTAINER_MetaData **mm = scls;
130#if HAVE_EXTRACTOR_H
129 enum EXTRACTOR_MetaType type; 131 enum EXTRACTOR_MetaType type;
130 const char *typename; 132 const char *typename;
131 const char *typename_i18n; 133 const char *typename_i18n;
134#endif
132 struct GNUNET_CONTAINER_MetaData *meta; 135 struct GNUNET_CONTAINER_MetaData *meta;
133 char *tmp; 136 char *tmp;
134 137
@@ -144,7 +147,7 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
144 */ 147 */
145 /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/ 148 /*tmp = GNUNET_STRINGS_to_utf8 (value, strlen (value), locale_charset ());*/
146 tmp = GNUNET_strdup (value); 149 tmp = GNUNET_strdup (value);
147 150#if HAVE_EXTRACTOR_H
148 type = EXTRACTOR_metatype_get_max (); 151 type = EXTRACTOR_metatype_get_max ();
149 while (type > 0) 152 while (type > 0)
150 { 153 {
@@ -181,7 +184,9 @@ GNUNET_FS_getopt_set_metadata (struct GNUNET_GETOPT_CommandLineProcessorContext
181 break; 184 break;
182 } 185 }
183 } 186 }
184 if (tmp != NULL) 187#endif
188
189 if (NULL != tmp)
185 { 190 {
186 GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>", 191 GNUNET_CONTAINER_meta_data_insert (meta, "<gnunet>",
187 EXTRACTOR_METATYPE_UNKNOWN, 192 EXTRACTOR_METATYPE_UNKNOWN,
diff --git a/src/fs/gnunet-directory.c b/src/fs/gnunet-directory.c
index 536766abb..c06e1aca2 100644
--- a/src/fs/gnunet-directory.c
+++ b/src/fs/gnunet-directory.c
@@ -36,13 +36,17 @@ static int ret;
36 * @param format format of data 36 * @param format format of data
37 * @param data_mime_type mime type of data 37 * @param data_mime_type mime type of data
38 * @param data value of the meta data 38 * @param data value of the meta data
39 * @param data_size number of bytes in data 39 * @param data_size number of bytes in @a data
40 * @return always 0 (to continue iterating) 40 * @return always 0 (to continue iterating)
41 */ 41 */
42static int 42static int
43item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, 43item_printer (void *cls,
44 enum EXTRACTOR_MetaFormat format, const char *data_mime_type, 44 const char *plugin_name,
45 const char *data, size_t data_size) 45 enum EXTRACTOR_MetaType type,
46 enum EXTRACTOR_MetaFormat format,
47 const char *data_mime_type,
48 const char *data,
49 size_t data_size)
46{ 50{
47 if (type == EXTRACTOR_METATYPE_GNUNET_FULL_DATA) 51 if (type == EXTRACTOR_METATYPE_GNUNET_FULL_DATA)
48 { 52 {
@@ -55,9 +59,16 @@ item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
55 return 0; 59 return 0;
56 if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) 60 if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME)
57 return 0; 61 return 0;
62#if HAVE_LIBEXTRACTOR
58 printf ("\t%20s: %s\n", 63 printf ("\t%20s: %s\n",
59 dgettext (LIBEXTRACTOR_GETTEXT_DOMAIN, 64 dgettext (LIBEXTRACTOR_GETTEXT_DOMAIN,
60 EXTRACTOR_metatype_to_string (type)), data); 65 EXTRACTOR_metatype_to_string (type)),
66 data);
67#else
68 printf ("\t%20d: %s\n",
69 type,
70 data);
71#endif
61 return 0; 72 return 0;
62} 73}
63 74
diff --git a/src/fs/gnunet-helper-fs-publish.c b/src/fs/gnunet-helper-fs-publish.c
index 2e63b12a8..6c2c76fe9 100644
--- a/src/fs/gnunet-helper-fs-publish.c
+++ b/src/fs/gnunet-helper-fs-publish.c
@@ -82,10 +82,12 @@ struct ScanTreeNode
82}; 82};
83 83
84 84
85#if HAVE_LIBEXTRACTOR
85/** 86/**
86 * List of libextractor plugins to use for extracting. 87 * List of libextractor plugins to use for extracting.
87 */ 88 */
88static struct EXTRACTOR_PluginList *plugins; 89static struct EXTRACTOR_PluginList *plugins;
90#endif
89 91
90/** 92/**
91 * File descriptor we use for IPC with the parent. 93 * File descriptor we use for IPC with the parent.
@@ -93,6 +95,7 @@ static struct EXTRACTOR_PluginList *plugins;
93static int output_stream; 95static int output_stream;
94 96
95 97
98#if HAVE_LIBEXTRACTOR
96/** 99/**
97 * Add meta data that libextractor finds to our meta data 100 * Add meta data that libextractor finds to our meta data
98 * container. 101 * container.
@@ -111,9 +114,13 @@ static int output_stream;
111 * @return always 0 to continue extracting 114 * @return always 0 to continue extracting
112 */ 115 */
113static int 116static int
114add_to_md (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type, 117add_to_md (void *cls,
115 enum EXTRACTOR_MetaFormat format, const char *data_mime_type, 118 const char *plugin_name,
116 const char *data, size_t data_len) 119 enum EXTRACTOR_MetaType type,
120 enum EXTRACTOR_MetaFormat format,
121 const char *data_mime_type,
122 const char *data,
123 size_t data_len)
117{ 124{
118 struct GNUNET_CONTAINER_MetaData *md = cls; 125 struct GNUNET_CONTAINER_MetaData *md = cls;
119 126
@@ -134,6 +141,7 @@ add_to_md (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
134 } 141 }
135 return 0; 142 return 0;
136} 143}
144#endif
137 145
138 146
139/** 147/**
@@ -151,7 +159,7 @@ free_tree (struct ScanTreeNode *tree)
151 if (NULL != tree->parent) 159 if (NULL != tree->parent)
152 GNUNET_CONTAINER_DLL_remove (tree->parent->children_head, 160 GNUNET_CONTAINER_DLL_remove (tree->parent->children_head,
153 tree->parent->children_tail, 161 tree->parent->children_tail,
154 tree); 162 tree);
155 GNUNET_free (tree->filename); 163 GNUNET_free (tree->filename);
156 GNUNET_free (tree); 164 GNUNET_free (tree);
157} 165}
@@ -383,7 +391,13 @@ extract_files (struct ScanTreeNode *item)
383 391
384 /* this is the expensive operation, *afterwards* we'll check for aborts */ 392 /* this is the expensive operation, *afterwards* we'll check for aborts */
385 meta = GNUNET_CONTAINER_meta_data_create (); 393 meta = GNUNET_CONTAINER_meta_data_create ();
386 EXTRACTOR_extract (plugins, item->filename, NULL, 0, &add_to_md, meta); 394#if HAVE_LIBEXTRACTOR
395 EXTRACTOR_extract (plugins,
396 item->filename,
397 NULL, 0,
398 &add_to_md,
399 meta);
400#endif
387 slen = strlen (item->filename) + 1; 401 slen = strlen (item->filename) + 1;
388 size = GNUNET_CONTAINER_meta_data_get_serialized_size (meta); 402 size = GNUNET_CONTAINER_meta_data_get_serialized_size (meta);
389 if (-1 == size) 403 if (-1 == size)
@@ -525,10 +539,12 @@ main (int argc,
525 if ( (NULL == ex) || 539 if ( (NULL == ex) ||
526 (0 != strcmp (ex, "-")) ) 540 (0 != strcmp (ex, "-")) )
527 { 541 {
542#if HAVE_LIBEXTRACTOR
528 plugins = EXTRACTOR_plugin_add_defaults (EXTRACTOR_OPTION_DEFAULT_POLICY); 543 plugins = EXTRACTOR_plugin_add_defaults (EXTRACTOR_OPTION_DEFAULT_POLICY);
529 if (NULL != ex) 544 if (NULL != ex)
530 plugins = EXTRACTOR_plugin_add_config (plugins, ex, 545 plugins = EXTRACTOR_plugin_add_config (plugins, ex,
531 EXTRACTOR_OPTION_DEFAULT_POLICY); 546 EXTRACTOR_OPTION_DEFAULT_POLICY);
547#endif
532 } 548 }
533 549
534 /* scan tree to find out how much work there is to be done */ 550 /* scan tree to find out how much work there is to be done */
@@ -536,7 +552,9 @@ main (int argc,
536 &root)) 552 &root))
537 { 553 {
538 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); 554 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0);
555#if HAVE_LIBEXTRACTOR
539 EXTRACTOR_plugin_remove_all (plugins); 556 EXTRACTOR_plugin_remove_all (plugins);
557#endif
540#if WINDOWS 558#if WINDOWS
541 GNUNET_free ((void*) argv); 559 GNUNET_free ((void*) argv);
542#endif 560#endif
@@ -547,7 +565,9 @@ main (int argc,
547 if (GNUNET_OK != 565 if (GNUNET_OK !=
548 write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0)) 566 write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_COUNTING_DONE, NULL, 0))
549 { 567 {
568#if HAVE_LIBEXTRACTOR
550 EXTRACTOR_plugin_remove_all (plugins); 569 EXTRACTOR_plugin_remove_all (plugins);
570#endif
551#if WINDOWS 571#if WINDOWS
552 GNUNET_free ((void*) argv); 572 GNUNET_free ((void*) argv);
553#endif 573#endif
@@ -560,7 +580,9 @@ main (int argc,
560 { 580 {
561 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0); 581 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_ERROR, NULL, 0);
562 free_tree (root); 582 free_tree (root);
583#if HAVE_LIBEXTRACTOR
563 EXTRACTOR_plugin_remove_all (plugins); 584 EXTRACTOR_plugin_remove_all (plugins);
585#endif
564#if WINDOWS 586#if WINDOWS
565 GNUNET_free ((void*) argv); 587 GNUNET_free ((void*) argv);
566#endif 588#endif
@@ -570,7 +592,9 @@ main (int argc,
570 } 592 }
571 /* enable "clean" shutdown by telling parent that we are done */ 593 /* enable "clean" shutdown by telling parent that we are done */
572 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0); 594 (void) write_message (GNUNET_MESSAGE_TYPE_FS_PUBLISH_HELPER_FINISHED, NULL, 0);
595#if HAVE_LIBEXTRACTOR
573 EXTRACTOR_plugin_remove_all (plugins); 596 EXTRACTOR_plugin_remove_all (plugins);
597#endif
574#if WINDOWS 598#if WINDOWS
575 GNUNET_free ((void*) argv); 599 GNUNET_free ((void*) argv);
576#endif 600#endif
@@ -578,4 +602,3 @@ main (int argc,
578} 602}
579 603
580/* end of gnunet-helper-fs-publish.c */ 604/* end of gnunet-helper-fs-publish.c */
581
diff --git a/src/fs/gnunet-publish.c b/src/fs/gnunet-publish.c
index b213218e4..7844acd96 100644
--- a/src/fs/gnunet-publish.c
+++ b/src/fs/gnunet-publish.c
@@ -348,7 +348,11 @@ meta_printer (void *cls,
348 return 0; 348 return 0;
349 if (EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME == type) 349 if (EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME == type)
350 return 0; 350 return 0;
351#if HAVE_LIBEXTRACTOR
351 FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data); 352 FPRINTF (stdout, "\t%s - %s\n", EXTRACTOR_metatype_to_string (type), data);
353#else
354 FPRINTF (stdout, "\t%d - %s\n", type, data);
355#endif
352 return 0; 356 return 0;
353} 357}
354 358
diff --git a/src/fs/gnunet-search.c b/src/fs/gnunet-search.c
index 395fb9ffe..9065922e1 100644
--- a/src/fs/gnunet-search.c
+++ b/src/fs/gnunet-search.c
@@ -82,9 +82,15 @@ item_printer (void *cls, const char *plugin_name, enum EXTRACTOR_MetaType type,
82 return 0; 82 return 0;
83 if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME) 83 if (type == EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME)
84 return 0; 84 return 0;
85#if HAVE_LIBEXTRACTOR
85 printf ("\t%20s: %s\n", 86 printf ("\t%20s: %s\n",
86 dgettext (LIBEXTRACTOR_GETTEXT_DOMAIN, 87 dgettext (LIBEXTRACTOR_GETTEXT_DOMAIN,
87 EXTRACTOR_metatype_to_string (type)), data); 88 EXTRACTOR_metatype_to_string (type)), data);
89#else
90 printf ("\t%20d: %s\n",
91 type,
92 data);
93#endif
88 return 0; 94 return 0;
89} 95}
90 96
diff --git a/src/fs/test_fs_directory.c b/src/fs/test_fs_directory.c
index bdbaf906f..4960b8922 100644
--- a/src/fs/test_fs_directory.c
+++ b/src/fs/test_fs_directory.c
@@ -17,15 +17,15 @@
17 Free Software Foundation, Inc., 59 Temple Place - Suite 330, 17 Free Software Foundation, Inc., 59 Temple Place - Suite 330,
18 Boston, MA 02111-1307, USA. 18 Boston, MA 02111-1307, USA.
19*/ 19*/
20
21/** 20/**
22 * @file fs/test_fs_directory.c 21 * @file fs/test_fs_directory.c
23 * @brief Test for fs_directory.c 22 * @brief Test for fs_directory.c
24 * @author Christian Grothoff 23 * @author Christian Grothoff
25 */ 24 */
26
27#include "platform.h" 25#include "platform.h"
26#if HAVE_EXTRACTOR_H
28#include <extractor.h> 27#include <extractor.h>
28#endif
29#include "gnunet_util_lib.h" 29#include "gnunet_util_lib.h"
30#include "gnunet_fs_service.h" 30#include "gnunet_fs_service.h"
31#include "fs_api.h" 31#include "fs_api.h"
@@ -99,7 +99,11 @@ testDirectory (unsigned int i)
99 { 99 {
100 GNUNET_snprintf (txt, sizeof (txt), "%u -- %u\n", p, q); 100 GNUNET_snprintf (txt, sizeof (txt), "%u -- %u\n", p, q);
101 GNUNET_CONTAINER_meta_data_insert (mds[p], "<test>", 101 GNUNET_CONTAINER_meta_data_insert (mds[p], "<test>",
102#if HAVE_EXTRACTOR_H
102 q % EXTRACTOR_metatype_get_max (), 103 q % EXTRACTOR_metatype_get_max (),
104#else
105 q % 128,
106#endif
103 EXTRACTOR_METAFORMAT_UTF8, 107 EXTRACTOR_METAFORMAT_UTF8,
104 "text/plain", txt, strlen (txt) + 1); 108 "text/plain", txt, strlen (txt) + 1);
105 } 109 }
diff --git a/src/include/Makefile.am b/src/include/Makefile.am
index c8e40bc27..af6d02ada 100644
--- a/src/include/Makefile.am
+++ b/src/include/Makefile.am
@@ -17,11 +17,8 @@ if TALER_ONLY
17gnunetinclude_HEADERS = \ 17gnunetinclude_HEADERS = \
18 platform.h plibc.h $(WINPROC) gettext.h \ 18 platform.h plibc.h $(WINPROC) gettext.h \
19 gnunet_common.h \ 19 gnunet_common.h \
20 gnunet_configuration_lib.h \
21 gnunet_container_lib.h \ 20 gnunet_container_lib.h \
22 gnunet_crypto_lib.h \ 21 gnunet_crypto_lib.h \
23 gnunet_disk_lib.h \
24 gnunet_scheduler_lib.h \
25 gnunet_strings_lib.h \ 22 gnunet_strings_lib.h \
26 gnunet_time_lib.h \ 23 gnunet_time_lib.h \
27 gnunet_util_taler_wallet_lib.h 24 gnunet_util_taler_wallet_lib.h
diff --git a/src/include/gnunet_configuration_lib.h b/src/include/gnunet_configuration_lib.h
index 2aaaac583..0939424a3 100644
--- a/src/include/gnunet_configuration_lib.h
+++ b/src/include/gnunet_configuration_lib.h
@@ -28,6 +28,7 @@
28#ifndef GNUNET_CONFIGURATION_LIB_H 28#ifndef GNUNET_CONFIGURATION_LIB_H
29#define GNUNET_CONFIGURATION_LIB_H 29#define GNUNET_CONFIGURATION_LIB_H
30 30
31#include "gnunet_time_lib.h"
31 32
32#ifdef __cplusplus 33#ifdef __cplusplus
33extern "C" 34extern "C"
diff --git a/src/include/gnunet_container_lib.h b/src/include/gnunet_container_lib.h
index 778e5b84b..590c6a2fa 100644
--- a/src/include/gnunet_container_lib.h
+++ b/src/include/gnunet_container_lib.h
@@ -35,8 +35,102 @@
35 35
36/* add error and config prototypes */ 36/* add error and config prototypes */
37#include "gnunet_crypto_lib.h" 37#include "gnunet_crypto_lib.h"
38
39#if HAVE_EXTRACTOR_H
40
38#include <extractor.h> 41#include <extractor.h>
39 42
43#else
44
45/* definitions from extractor.h we need for the build */
46
47/**
48 * Enumeration defining various sources of keywords. See also
49 * http://dublincore.org/documents/1998/09/dces/
50 */
51enum EXTRACTOR_MetaType {
52 EXTRACTOR_METATYPE_RESERVED = 0,
53 EXTRACTOR_METATYPE_MIMETYPE = 1,
54 EXTRACTOR_METATYPE_FILENAME = 2,
55 EXTRACTOR_METATYPE_COMMENT = 3,
56 EXTRACTOR_METATYPE_TITLE = 4,
57 EXTRACTOR_METATYPE_BOOK_TITLE = 5,
58 EXTRACTOR_METATYPE_JOURNAL_NAME = 8,
59 EXTRACTOR_METATYPE_AUTHOR_NAME = 13,
60 EXTRACTOR_METATYPE_PUBLICATION_DATE = 24,
61 EXTRACTOR_METATYPE_URL = 29,
62 EXTRACTOR_METATYPE_URI = 30,
63 EXTRACTOR_METATYPE_ISRC = 31,
64 EXTRACTOR_METATYPE_UNKNOWN = 45,
65 EXTRACTOR_METATYPE_DESCRIPTION = 46,
66 EXTRACTOR_METATYPE_KEYWORDS = 49,
67 EXTRACTOR_METATYPE_SUBJECT = 52,
68 EXTRACTOR_METATYPE_PACKAGE_NAME = 69,
69 EXTRACTOR_METATYPE_THUMBNAIL = 114,
70 EXTRACTOR_METATYPE_ALBUM = 129,
71 EXTRACTOR_METATYPE_ARTIST = 130,
72 EXTRACTOR_METATYPE_ORIGINAL_TITLE = 162,
73 EXTRACTOR_METATYPE_GNUNET_FULL_DATA = 174,
74 EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME = 180,
75
76};
77
78/**
79 * Format in which the extracted meta data is presented.
80 */
81enum EXTRACTOR_MetaFormat {
82 /**
83 * Format is unknown.
84 */
85 EXTRACTOR_METAFORMAT_UNKNOWN = 0,
86
87 /**
88 * 0-terminated, UTF-8 encoded string. "data_len"
89 * is strlen(data)+1.
90 */
91 EXTRACTOR_METAFORMAT_UTF8 = 1,
92
93 /**
94 * Some kind of binary format, see given Mime type.
95 */
96 EXTRACTOR_METAFORMAT_BINARY = 2,
97
98 /**
99 * 0-terminated string. The specific encoding is unknown.
100 * "data_len" is strlen (data)+1.
101 */
102 EXTRACTOR_METAFORMAT_C_STRING = 3
103};
104
105
106/**
107 * Type of a function that libextractor calls for each
108 * meta data item found.
109 *
110 * @param cls closure (user-defined)
111 * @param plugin_name name of the plugin that produced this value;
112 * special values can be used (i.e. '&lt;zlib&gt;' for zlib being
113 * used in the main libextractor library and yielding
114 * meta data).
115 * @param type libextractor-type describing the meta data
116 * @param format basic format information about @a data
117 * @param data_mime_type mime-type of @a data (not of the original file);
118 * can be NULL (if mime-type is not known)
119 * @param data actual meta-data found
120 * @param data_len number of bytes in @a data
121 * @return 0 to continue extracting, 1 to abort
122 */
123typedef int
124(*EXTRACTOR_MetaDataProcessor) (void *cls,
125 const char *plugin_name,
126 enum EXTRACTOR_MetaType type,
127 enum EXTRACTOR_MetaFormat format,
128 const char *data_mime_type,
129 const char *data,
130 size_t data_len);
131
132#endif
133
40#ifndef EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME 134#ifndef EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME
41/* hack for LE < 0.6.3 */ 135/* hack for LE < 0.6.3 */
42#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME 180 136#define EXTRACTOR_METATYPE_GNUNET_ORIGINAL_FILENAME 180
diff --git a/src/include/gnunet_crypto_lib.h b/src/include/gnunet_crypto_lib.h
index ff337e797..99508af43 100644
--- a/src/include/gnunet_crypto_lib.h
+++ b/src/include/gnunet_crypto_lib.h
@@ -54,9 +54,13 @@ struct GNUNET_HashCode;
54struct GNUNET_PeerIdentity; 54struct GNUNET_PeerIdentity;
55 55
56#include "gnunet_common.h" 56#include "gnunet_common.h"
57#include "gnunet_scheduler_lib.h"
58#include <gcrypt.h> 57#include <gcrypt.h>
59 58
59/**
60 * We need this enum here, but not the entire scheduler API.
61 * For the full definition, see gnunet_scheduler_lib.h.
62 */
63enum GNUNET_SCHEDULER_Priority;
60 64
61/** 65/**
62 * @brief A 512-bit hashcode 66 * @brief A 512-bit hashcode
diff --git a/src/include/gnunet_util_taler_wallet_lib.h b/src/include/gnunet_util_taler_wallet_lib.h
index ff3b2613b..a1db60de5 100644
--- a/src/include/gnunet_util_taler_wallet_lib.h
+++ b/src/include/gnunet_util_taler_wallet_lib.h
@@ -43,7 +43,6 @@ extern "C"
43 43
44#include "gnunet_crypto_lib.h" 44#include "gnunet_crypto_lib.h"
45#include "gnunet_container_lib.h" 45#include "gnunet_container_lib.h"
46#include "gnunet_disk_lib.h"
47#include "gnunet_strings_lib.h" 46#include "gnunet_strings_lib.h"
48 47
49#if 0 /* keep Emacsens' auto-indent happy */ 48#if 0 /* keep Emacsens' auto-indent happy */
diff --git a/src/util/Makefile.am b/src/util/Makefile.am
index a2482fc87..916a588fa 100644
--- a/src/util/Makefile.am
+++ b/src/util/Makefile.am
@@ -128,7 +128,6 @@ libgnunetutil_taler_wallet_la_SOURCES = \
128 common_allocation.c \ 128 common_allocation.c \
129 common_endian.c \ 129 common_endian.c \
130 common_logging.c \ 130 common_logging.c \
131 configuration.c \
132 container_heap.c \ 131 container_heap.c \
133 container_multihashmap.c \ 132 container_multihashmap.c \
134 container_multihashmap32.c \ 133 container_multihashmap32.c \
@@ -141,8 +140,6 @@ libgnunetutil_taler_wallet_la_SOURCES = \
141 crypto_mpi.c \ 140 crypto_mpi.c \
142 crypto_random.c \ 141 crypto_random.c \
143 crypto_rsa.c \ 142 crypto_rsa.c \
144 disk.c \
145 disk.h \
146 strings.c \ 143 strings.c \
147 time.c 144 time.c
148 145
diff --git a/src/util/common_allocation.c b/src/util/common_allocation.c
index 5280d73b2..4fdc05f10 100644
--- a/src/util/common_allocation.c
+++ b/src/util/common_allocation.c
@@ -24,7 +24,7 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_crypto_lib.h"
28#if HAVE_MALLOC_H 28#if HAVE_MALLOC_H
29#include <malloc.h> 29#include <malloc.h>
30#endif 30#endif
diff --git a/src/util/common_endian.c b/src/util/common_endian.c
index 4a8a01664..e6c34250a 100644
--- a/src/util/common_endian.c
+++ b/src/util/common_endian.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_util_lib.h" 29#include "gnunet_crypto_lib.h"
30 30
31#define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util",__VA_ARGS__)
32 32
diff --git a/src/util/common_logging.c b/src/util/common_logging.c
index 695b49913..492d00dc6 100644
--- a/src/util/common_logging.c
+++ b/src/util/common_logging.c
@@ -24,7 +24,8 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_crypto_lib.h"
28#include "gnunet_strings_lib.h"
28#include <regex.h> 29#include <regex.h>
29 30
30 31
@@ -328,7 +329,6 @@ setup_log_file (const struct tm *tm)
328{ 329{
329 static char last_fn[PATH_MAX + 1]; 330 static char last_fn[PATH_MAX + 1];
330 char fn[PATH_MAX + 1]; 331 char fn[PATH_MAX + 1];
331 int dirwarn;
332 int altlog_fd; 332 int altlog_fd;
333 int dup_return; 333 int dup_return;
334 FILE *altlog; 334 FILE *altlog;
@@ -352,7 +352,6 @@ setup_log_file (const struct tm *tm)
352 return GNUNET_OK; /* no change */ 352 return GNUNET_OK; /* no change */
353 log_rotate (last_fn); 353 log_rotate (last_fn);
354 strcpy (last_fn, fn); 354 strcpy (last_fn, fn);
355 dirwarn = (GNUNET_OK != GNUNET_DISK_directory_create_for_file (fn));
356#if WINDOWS 355#if WINDOWS
357 altlog_fd = OPEN (fn, O_APPEND | 356 altlog_fd = OPEN (fn, O_APPEND |
358 O_BINARY | 357 O_BINARY |
@@ -386,16 +385,13 @@ setup_log_file (const struct tm *tm)
386 if (-1 == altlog_fd) 385 if (-1 == altlog_fd)
387 { 386 {
388 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", fn); 387 GNUNET_log_strerror_file (GNUNET_ERROR_TYPE_ERROR, "open", fn);
389 if (dirwarn)
390 GNUNET_log (GNUNET_ERROR_TYPE_WARNING,
391 _("Failed to create or access directory for log file `%s'\n"),
392 fn);
393 return GNUNET_SYSERR; 388 return GNUNET_SYSERR;
394 } 389 }
395 GNUNET_stderr = altlog; 390 GNUNET_stderr = altlog;
396 return GNUNET_OK; 391 return GNUNET_OK;
397} 392}
398 393
394
399/** 395/**
400 * Utility function - adds a parsed definition to logdefs array. 396 * Utility function - adds a parsed definition to logdefs array.
401 * 397 *
diff --git a/src/util/configuration.c b/src/util/configuration.c
index f61b43d57..3c7570981 100644
--- a/src/util/configuration.c
+++ b/src/util/configuration.c
@@ -25,7 +25,10 @@
25 */ 25 */
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_crypto_lib.h"
29#include "gnunet_strings_lib.h"
30#include "gnunet_configuration_lib.h"
31#include "gnunet_disk_lib.h"
29 32
30#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 33#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
31 34
diff --git a/src/util/container_heap.c b/src/util/container_heap.c
index 8c3de6c26..ad96af01d 100644
--- a/src/util/container_heap.c
+++ b/src/util/container_heap.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_util_lib.h" 29#include "gnunet_container_lib.h"
30 30
31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
32 32
diff --git a/src/util/container_meta_data.c b/src/util/container_meta_data.c
index 622b45334..5cef31f37 100644
--- a/src/util/container_meta_data.c
+++ b/src/util/container_meta_data.c
@@ -26,7 +26,9 @@
26 26
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29#if HAVE_EXTRACTOR_H
29#include <extractor.h> 30#include <extractor.h>
31#endif
30#include <zlib.h> 32#include <zlib.h>
31 33
32#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 34#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
@@ -432,7 +434,8 @@ GNUNET_CONTAINER_meta_data_add_publication_date (struct
432 struct GNUNET_TIME_Absolute t; 434 struct GNUNET_TIME_Absolute t;
433 435
434 t = GNUNET_TIME_absolute_get (); 436 t = GNUNET_TIME_absolute_get ();
435 GNUNET_CONTAINER_meta_data_delete (md, EXTRACTOR_METATYPE_PUBLICATION_DATE, 437 GNUNET_CONTAINER_meta_data_delete (md,
438 EXTRACTOR_METATYPE_PUBLICATION_DATE,
436 NULL, 0); 439 NULL, 0);
437 dat = GNUNET_STRINGS_absolute_time_to_string (t); 440 dat = GNUNET_STRINGS_absolute_time_to_string (t);
438 GNUNET_CONTAINER_meta_data_insert (md, "<gnunet>", 441 GNUNET_CONTAINER_meta_data_insert (md, "<gnunet>",
@@ -481,8 +484,8 @@ GNUNET_CONTAINER_meta_data_iterate (const struct GNUNET_CONTAINER_MetaData *md,
481 * @return NULL if no entry was found 484 * @return NULL if no entry was found
482 */ 485 */
483char * 486char *
484GNUNET_CONTAINER_meta_data_get_by_type (const struct GNUNET_CONTAINER_MetaData 487GNUNET_CONTAINER_meta_data_get_by_type (const struct GNUNET_CONTAINER_MetaData *md,
485 *md, enum EXTRACTOR_MetaType type) 488 enum EXTRACTOR_MetaType type)
486{ 489{
487 struct MetaItem *pos; 490 struct MetaItem *pos;
488 491
diff --git a/src/util/container_multihashmap.c b/src/util/container_multihashmap.c
index df6dd5704..46379b34e 100644
--- a/src/util/container_multihashmap.c
+++ b/src/util/container_multihashmap.c
@@ -24,7 +24,7 @@
24 */ 24 */
25 25
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_container_lib.h"
28 28
29#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 29#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
30 30
diff --git a/src/util/container_multihashmap32.c b/src/util/container_multihashmap32.c
index 00dee18cd..d7b8413c4 100644
--- a/src/util/container_multihashmap32.c
+++ b/src/util/container_multihashmap32.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_util_lib.h" 29#include "gnunet_container_lib.h"
30 30
31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
32 32
diff --git a/src/util/crypto_crc.c b/src/util/crypto_crc.c
index 252cdad05..5a8357478 100644
--- a/src/util/crypto_crc.c
+++ b/src/util/crypto_crc.c
@@ -28,7 +28,7 @@
28 * @author Christian Grothoff 28 * @author Christian Grothoff
29 */ 29 */
30#include "platform.h" 30#include "platform.h"
31#include "gnunet_util_lib.h" 31#include "gnunet_crypto_lib.h"
32 32
33#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 33#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
34 34
diff --git a/src/util/crypto_ecc.c b/src/util/crypto_ecc.c
index 87c787185..adeaf77c8 100644
--- a/src/util/crypto_ecc.c
+++ b/src/util/crypto_ecc.c
@@ -25,7 +25,8 @@
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include <gcrypt.h> 27#include <gcrypt.h>
28#include "gnunet_util_lib.h" 28#include "gnunet_crypto_lib.h"
29#include "gnunet_strings_lib.h"
29 30
30#define EXTRA_CHECKS 0 31#define EXTRA_CHECKS 0
31 32
diff --git a/src/util/crypto_hash.c b/src/util/crypto_hash.c
index e9f25bf84..8e5730ffd 100644
--- a/src/util/crypto_hash.c
+++ b/src/util/crypto_hash.c
@@ -24,7 +24,8 @@
24 * @author Christian Grothoff 24 * @author Christian Grothoff
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_crypto_lib.h"
28#include "gnunet_strings_lib.h"
28#include <gcrypt.h> 29#include <gcrypt.h>
29 30
30#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
diff --git a/src/util/crypto_mpi.c b/src/util/crypto_mpi.c
index 806a35da8..ad64778fd 100644
--- a/src/util/crypto_mpi.c
+++ b/src/util/crypto_mpi.c
@@ -26,7 +26,7 @@
26 */ 26 */
27#include "platform.h" 27#include "platform.h"
28#include <gcrypt.h> 28#include <gcrypt.h>
29#include "gnunet_util_lib.h" 29#include "gnunet_crypto_lib.h"
30 30
31 31
32#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 32#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
diff --git a/src/util/crypto_random.c b/src/util/crypto_random.c
index 2960af17e..f9a0664e2 100644
--- a/src/util/crypto_random.c
+++ b/src/util/crypto_random.c
@@ -25,7 +25,7 @@
25 * @author Christian Grothoff 25 * @author Christian Grothoff
26 */ 26 */
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_crypto_lib.h"
29#include <gcrypt.h> 29#include <gcrypt.h>
30 30
31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
diff --git a/src/util/crypto_rsa.c b/src/util/crypto_rsa.c
index 0b21b40b4..b8e29146f 100644
--- a/src/util/crypto_rsa.c
+++ b/src/util/crypto_rsa.c
@@ -22,7 +22,7 @@
22 */ 22 */
23#include "platform.h" 23#include "platform.h"
24#include <gcrypt.h> 24#include <gcrypt.h>
25#include "gnunet_util_lib.h" 25#include "gnunet_crypto_lib.h"
26 26
27#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 27#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
28 28
@@ -413,7 +413,7 @@ GNUNET_CRYPTO_rsa_blinding_key_create (unsigned int len)
413 413
414/** 414/**
415 * Compare the values of two blinding keys. 415 * Compare the values of two blinding keys.
416 * 416 *
417 * @param b1 one key 417 * @param b1 one key
418 * @param b2 the other key 418 * @param b2 the other key
419 * @return 0 if the two are equal 419 * @return 0 if the two are equal
@@ -443,7 +443,7 @@ GNUNET_CRYPTO_rsa_signature_cmp (struct GNUNET_CRYPTO_rsa_Signature *s1,
443 size_t z1; 443 size_t z1;
444 size_t z2; 444 size_t z2;
445 int ret; 445 int ret;
446 446
447 z1 = GNUNET_CRYPTO_rsa_signature_encode (s1, 447 z1 = GNUNET_CRYPTO_rsa_signature_encode (s1,
448 &b1); 448 &b1);
449 z2 = GNUNET_CRYPTO_rsa_signature_encode (s2, 449 z2 = GNUNET_CRYPTO_rsa_signature_encode (s2,
@@ -476,7 +476,7 @@ GNUNET_CRYPTO_rsa_public_key_cmp (struct GNUNET_CRYPTO_rsa_PublicKey *p1,
476 size_t z1; 476 size_t z1;
477 size_t z2; 477 size_t z2;
478 int ret; 478 int ret;
479 479
480 z1 = GNUNET_CRYPTO_rsa_public_key_encode (p1, 480 z1 = GNUNET_CRYPTO_rsa_public_key_encode (p1,
481 &b1); 481 &b1);
482 z2 = GNUNET_CRYPTO_rsa_public_key_encode (p2, 482 z2 = GNUNET_CRYPTO_rsa_public_key_encode (p2,
diff --git a/src/util/crypto_symmetric.c b/src/util/crypto_symmetric.c
index 455166546..6465d5eb6 100644
--- a/src/util/crypto_symmetric.c
+++ b/src/util/crypto_symmetric.c
@@ -26,7 +26,7 @@
26 */ 26 */
27 27
28#include "platform.h" 28#include "platform.h"
29#include "gnunet_util_lib.h" 29#include "gnunet_crypto_lib.h"
30#include <gcrypt.h> 30#include <gcrypt.h>
31 31
32#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 32#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
diff --git a/src/util/disk.c b/src/util/disk.c
index a56966d04..c9f6408e8 100644
--- a/src/util/disk.c
+++ b/src/util/disk.c
@@ -24,8 +24,9 @@
24 * @author Nils Durner 24 * @author Nils Durner
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h"
28#include "disk.h" 27#include "disk.h"
28#include "gnunet_strings_lib.h"
29#include "gnunet_disk_lib.h"
29 30
30#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 31#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
31 32
diff --git a/src/util/disk.h b/src/util/disk.h
index 1dfec216f..2592bd8c0 100644
--- a/src/util/disk.h
+++ b/src/util/disk.h
@@ -26,7 +26,8 @@
26#ifndef GNUNET_DISK_H_ 26#ifndef GNUNET_DISK_H_
27#define GNUNET_DISK_H_ 27#define GNUNET_DISK_H_
28 28
29#include "gnunet_util_lib.h" 29#include "gnunet_crypto_lib.h"
30#include "gnunet_disk_lib.h"
30 31
31/** 32/**
32 * Retrieve OS file handle 33 * Retrieve OS file handle
diff --git a/src/util/strings.c b/src/util/strings.c
index 379f3f5a3..407a135d1 100644
--- a/src/util/strings.c
+++ b/src/util/strings.c
@@ -29,7 +29,8 @@
29#if HAVE_ICONV 29#if HAVE_ICONV
30#include <iconv.h> 30#include <iconv.h>
31#endif 31#endif
32#include "gnunet_util_lib.h" 32#include "gnunet_crypto_lib.h"
33#include "gnunet_strings_lib.h"
33#include <unicase.h> 34#include <unicase.h>
34#include <unistr.h> 35#include <unistr.h>
35#include <uniconv.h> 36#include <uniconv.h>
diff --git a/src/util/test_container_meta_data.c b/src/util/test_container_meta_data.c
index a3729fc9f..df6587efd 100644
--- a/src/util/test_container_meta_data.c
+++ b/src/util/test_container_meta_data.c
@@ -27,6 +27,8 @@
27#include "platform.h" 27#include "platform.h"
28#include "gnunet_util_lib.h" 28#include "gnunet_util_lib.h"
29 29
30#if HAVE_EXTRACTOR_H
31
30#define ABORT(m) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_meta_data_destroy(m); return 1; } 32#define ABORT(m) { fprintf(stderr, "Error at %s:%d\n", __FILE__, __LINE__); if (m != NULL) GNUNET_CONTAINER_meta_data_destroy(m); return 1; }
31 33
32static int 34static int
@@ -343,4 +345,16 @@ main (int argc, char *argv[])
343 return 0; 345 return 0;
344} 346}
345 347
348#else
349
350int
351main (int argc, char *argv[])
352{
353 fprintf (stderr,
354 "GNU libextractor not found, skipping test.\n");
355 return 0;
356}
357
358#endif
359
346/* end of test_container_meta_data.c */ 360/* end of test_container_meta_data.c */
diff --git a/src/util/time.c b/src/util/time.c
index 01a3cddd5..78dd4c6d2 100644
--- a/src/util/time.c
+++ b/src/util/time.c
@@ -24,7 +24,8 @@
24 * @brief functions for handling time and time arithmetic 24 * @brief functions for handling time and time arithmetic
25 */ 25 */
26#include "platform.h" 26#include "platform.h"
27#include "gnunet_util_lib.h" 27#include "gnunet_crypto_lib.h"
28#include "gnunet_time_lib.h"
28 29
29#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__) 30#define LOG(kind,...) GNUNET_log_from (kind, "util", __VA_ARGS__)
30 31