diff options
author | Christian Grothoff <christian@grothoff.org> | 2018-12-02 12:09:09 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2018-12-02 12:09:09 +0100 |
commit | fff067577af897c6e4f4b7886aec56c4870ced56 (patch) | |
tree | 7521c652b19745c610eaca72c94994e1b2d175a3 | |
parent | ba76cc56c02b7ea362136bce5b6ce9e1ce82c4de (diff) | |
download | libextractor-fff067577af897c6e4f4b7886aec56c4870ced56.tar.gz libextractor-fff067577af897c6e4f4b7886aec56c4870ced56.zip |
fix #5488
-rw-r--r-- | .gitignore | 13 | ||||
-rw-r--r-- | ChangeLog | 3 | ||||
-rw-r--r-- | configure.ac | 118 | ||||
-rw-r--r-- | src/include/extractor.h | 32 | ||||
-rw-r--r-- | src/main/Makefile.am | 4 | ||||
-rw-r--r-- | src/main/test_extractor.c | 12 |
6 files changed, 93 insertions, 89 deletions
@@ -45,19 +45,8 @@ out | |||
45 | po/Makefile | 45 | po/Makefile |
46 | po/Makefile.in | 46 | po/Makefile.in |
47 | po/POTFILES | 47 | po/POTFILES |
48 | po/de.gmo | 48 | po/*.gmo |
49 | po/fr.gmo | ||
50 | po/ga.gmo | ||
51 | po/it.gmo | ||
52 | po/nl.gmo | ||
53 | po/pl.gmo | ||
54 | po/ro.gmo | ||
55 | po/rw.gmo | ||
56 | po/stamp-po | 49 | po/stamp-po |
57 | po/sr.gmo | ||
58 | po/sv.gmo | ||
59 | po/uk.gmo | ||
60 | po/vi.gmo | ||
61 | src/Makefile | 50 | src/Makefile |
62 | src/Makefile.in | 51 | src/Makefile.in |
63 | src/common/.deps/ | 52 | src/common/.deps/ |
@@ -1,3 +1,6 @@ | |||
1 | Sun Dec 2 12:05:33 CET 2018 | ||
2 | Fix #5488: do not export non-public functions from API. -CG | ||
3 | |||
1 | Sun Nov 18 11:19:28 CET 2018 | 4 | Sun Nov 18 11:19:28 CET 2018 |
2 | Releasing GNU libextractor 1.8. -CG | 5 | Releasing GNU libextractor 1.8. -CG |
3 | 6 | ||
diff --git a/configure.ac b/configure.ac index 40a35c2..5b4422a 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -155,12 +155,9 @@ mingw*) | |||
155 | EXT_LIB_PATH="-L$with_plibc/lib $EXT_LIB_PATH" | 155 | EXT_LIB_PATH="-L$with_plibc/lib $EXT_LIB_PATH" |
156 | plibc=1))]) | 156 | plibc=1))]) |
157 | 157 | ||
158 | if test $plibc -ne 1; | 158 | AS_IF([test $plibc -ne 1], |
159 | then | 159 | [AC_MSG_ERROR([libextractor requires PlibC])], |
160 | AC_MSG_ERROR([libextractor requires PlibC]) | 160 | [LIBS="$LIBS -lplibc"]) |
161 | else | ||
162 | LIBS="$LIBS -lplibc" | ||
163 | fi | ||
164 | 161 | ||
165 | AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-all-symbols" | 162 | AM_LDFLAGS="$AM_LDFLAGS -Wl,--export-all-symbols" |
166 | AM_CONDITIONAL(HAVE_GNU_LD, true) | 163 | AM_CONDITIONAL(HAVE_GNU_LD, true) |
@@ -211,10 +208,8 @@ AM_CONDITIONAL(MINGW, test "$build_os" = "mingw32") | |||
211 | 208 | ||
212 | 209 | ||
213 | # use '-fno-strict-aliasing', but only if the compiler can take it | 210 | # use '-fno-strict-aliasing', but only if the compiler can take it |
214 | if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; | 211 | AS_IF([gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1], |
215 | then | 212 | [AM_CFLAGS="-fno-strict-aliasing $AM_CFLAGS"]) |
216 | AM_CFLAGS="-fno-strict-aliasing $AM_CFLAGS" | ||
217 | fi | ||
218 | 213 | ||
219 | AM_CONDITIONAL(HAVE_CXX, test "x$HAVE_CXX" = "xyes") | 214 | AM_CONDITIONAL(HAVE_CXX, test "x$HAVE_CXX" = "xyes") |
220 | 215 | ||
@@ -222,27 +217,47 @@ AM_CONDITIONAL(HAVE_CXX, test "x$HAVE_CXX" = "xyes") | |||
222 | # Adam shostack suggests the following for Windows: | 217 | # Adam shostack suggests the following for Windows: |
223 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all | 218 | # -D_FORTIFY_SOURCE=2 -fstack-protector-all |
224 | AC_ARG_ENABLE(gcc-hardening, | 219 | AC_ARG_ENABLE(gcc-hardening, |
225 | AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks), | 220 | [AS_HELP_STRING(--enable-gcc-hardening, enable compiler security checks)], |
226 | [if test x$enableval = xyes; then | 221 | [AS_IF([test x$enableval = xyes], |
227 | AM_CFLAGS="$AM_CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all" | 222 | [AM_CFLAGS="$AM_CFLAGS -D_FORTIFY_SOURCE=2 -fstack-protector-all" |
228 | AM_CFLAGS="$AM_CFLAGS -fwrapv -fPIE -Wstack-protector" | 223 | AM_CFLAGS="$AM_CFLAGS -fwrapv -fPIE -Wstack-protector" |
229 | AM_CFLAGS="$AM_CFLAGS --param ssp-buffer-size=1" | 224 | AM_CFLAGS="$AM_CFLAGS --param ssp-buffer-size=1" |
230 | AM_LDFLAGS="$AM_LDFLAGS -pie" | 225 | AM_LDFLAGS="$AM_LDFLAGS -pie"])]) |
231 | fi]) | ||
232 | 226 | ||
233 | 227 | ||
234 | # Linker hardening options | 228 | # Linker hardening options |
235 | # Currently these options are ELF specific - you can't use this with MacOSX | 229 | # Currently these options are ELF specific - you can't use this with MacOSX |
236 | AC_ARG_ENABLE(linker-hardening, | 230 | AC_ARG_ENABLE(linker-hardening, |
237 | AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups), | 231 | [AS_HELP_STRING(--enable-linker-hardening, enable linker security fixups)], |
238 | [if test x$enableval = xyes; then | 232 | [AS_IF([x$enableval = xyes], |
239 | AM_LDFLAGS="$AM_LDFLAGS -z relro -z now" | 233 | [AM_LDFLAGS="$AM_LDFLAGS -z relro -z now"])]) |
240 | fi]) | 234 | |
235 | |||
236 | # Support for hiding non-public symbols | ||
237 | HIDDEN_VISIBILITY_CFLAGS="" | ||
238 | case "$host" in | ||
239 | *-*-mingw*) | ||
240 | dnl on mingw32 we do -fvisibility=hidden and __declspec(dllexport) | ||
241 | AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) __declspec(dllexport) extern], | ||
242 | [defines how to decorate public symbols while building]) | ||
243 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden" | ||
244 | ;; | ||
245 | *) | ||
246 | dnl on other compilers, check if we can do -fvisibility=hidden | ||
247 | AX_CHECK_LINK_FLAG([-fvisibility=hidden], | ||
248 | [AX_CHECK_COMPILE_FLAG([-fvisibility=hidden], | ||
249 | [AC_DEFINE([_EXTRACTOR_EXTERN], [__attribute__((visibility("default"))) extern], | ||
250 | [defines how to decorate public symbols while building]) | ||
251 | HIDDEN_VISIBILITY_CFLAGS="-fvisibility=hidden"])]) | ||
252 | ;; | ||
253 | esac | ||
254 | AC_SUBST(HIDDEN_VISIBILITY_CFLAGS) | ||
255 | |||
241 | 256 | ||
242 | 257 | ||
243 | # Checks for libraries. | 258 | # Checks for libraries. |
244 | 259 | ||
245 | AC_CHECK_HEADERS(langinfo.h) | 260 | AC_CHECK_HEADERS([langinfo.h]) |
246 | 261 | ||
247 | # Check for libltdl header (#2999) | 262 | # Check for libltdl header (#2999) |
248 | ltdl=0 | 263 | ltdl=0 |
@@ -274,12 +289,9 @@ AC_ARG_WITH(ltdl, | |||
274 | AC_CHECK_HEADERS(ltdl.h, | 289 | AC_CHECK_HEADERS(ltdl.h, |
275 | AC_CHECK_LIB([ltdl], [lt_dlopenext], | 290 | AC_CHECK_LIB([ltdl], [lt_dlopenext], |
276 | ltdl=1))]) | 291 | ltdl=1))]) |
277 | if test x$ltdl = x1 | 292 | AS_IF([test x$ltdl = x1], |
278 | then | 293 | [AC_MSG_RESULT([libltdl found])], |
279 | AC_MSG_RESULT([libltdl found]) | 294 | [AC_MSG_ERROR([libextractor requires libltdl (from GNU libtool), try installing libltdl-dev])]) |
280 | else | ||
281 | AC_MSG_ERROR([libextractor requires libltdl (from GNU libtool), try installing libltdl-dev]) | ||
282 | fi | ||
283 | 295 | ||
284 | # check for apparmor | 296 | # check for apparmor |
285 | AC_CHECK_LIB(apparmor, aa_change_profile, | 297 | AC_CHECK_LIB(apparmor, aa_change_profile, |
@@ -542,10 +554,8 @@ AC_LINK_IFELSE( | |||
542 | LIBS="$SAVED_LIBS $SOCKET_LIBS" | 554 | LIBS="$SAVED_LIBS $SOCKET_LIBS" |
543 | AC_LANG_POP(C) | 555 | AC_LANG_POP(C) |
544 | AC_MSG_RESULT([$sockets]) | 556 | AC_MSG_RESULT([$sockets]) |
545 | if test "x$sockets" = "xno" | 557 | AS_IF([test "x$sockets" = "xno"], |
546 | then | 558 | [AC_MSG_ERROR([libextractor requires some kind of socket library])]) |
547 | AC_MSG_ERROR([libextractor requires some kind of socket library]) | ||
548 | fi | ||
549 | AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS]) | 559 | AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS]) |
550 | 560 | ||
551 | LE_LIB_LIBS=$LIBS | 561 | LE_LIB_LIBS=$LIBS |
@@ -574,22 +584,16 @@ AC_ARG_ENABLE(glib, | |||
574 | esac], | 584 | esac], |
575 | AC_MSG_RESULT(allowed)) | 585 | AC_MSG_RESULT(allowed)) |
576 | 586 | ||
577 | if test x$without_glib != xtrue | 587 | AS_IF([test x$without_glib != xtrue], |
578 | then | 588 | [AS_IF([test $with_gnu_ld = yes], |
579 | if test $with_gnu_ld = yes | 589 | [# We need both GNU LD and GLIB here! |
580 | then | 590 | AM_CONDITIONAL(HAVE_GLIB,true) |
581 | # We need both GNU LD and GLIB here! | 591 | AC_DEFINE(HAVE_GLIB, 1, [Have glib])], |
582 | AM_CONDITIONAL(HAVE_GLIB,true) | 592 | [# We may have GLIB, but without GNU LD we must not use it! |
583 | AC_DEFINE(HAVE_GLIB, 1, [Have glib]) | 593 | AM_CONDITIONAL(HAVE_GLIB,false) |
584 | else | 594 | AC_DEFINE(HAVE_GLIB, 0, [Have glib, but not GNU LD])])], |
585 | # We may have GLIB, but without GNU LD we must not use it! | 595 | [AM_CONDITIONAL(HAVE_GLIB,false) |
586 | AM_CONDITIONAL(HAVE_GLIB,false) | 596 | AC_DEFINE(HAVE_GLIB, 0, [Have glib])]) |
587 | AC_DEFINE(HAVE_GLIB, 0, [Have glib, but not GNU LD]) | ||
588 | fi | ||
589 | else | ||
590 | AM_CONDITIONAL(HAVE_GLIB,false) | ||
591 | AC_DEFINE(HAVE_GLIB, 0, [Have glib]) | ||
592 | fi | ||
593 | 597 | ||
594 | # smf requires glib.h | 598 | # smf requires glib.h |
595 | CFLAGS_OLD="$CFLAGS" | 599 | CFLAGS_OLD="$CFLAGS" |
@@ -609,13 +613,10 @@ AC_MSG_CHECKING(for gdk-pixbuf) | |||
609 | PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no]) | 613 | PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no]) |
610 | 614 | ||
611 | AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno) | 615 | AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno) |
612 | if test $have_gdk_pixbuf != no | 616 | AS_IF([test $have_gdk_pixbuf != no], |
613 | then | 617 | [have_gdk_pixbuf=1], |
614 | have_gdk_pixbuf=1 | 618 | [have_gdk_pixbuf=0 |
615 | else | 619 | AC_MSG_NOTICE([Cannot find Gdk-pixbuf: Is pkg-config in path?])]) |
616 | have_gdk_pixbuf=0 | ||
617 | AC_MSG_NOTICE([Cannot find Gdk-pixbuf: Is pkg-config in path?]) | ||
618 | fi | ||
619 | AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf]) | 620 | AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf]) |
620 | 621 | ||
621 | CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" | 622 | CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" |
@@ -670,9 +671,8 @@ AC_ARG_ENABLE(ffmpeg, | |||
670 | esac], | 671 | esac], |
671 | [ AC_MSG_RESULT(yes) | 672 | [ AC_MSG_RESULT(yes) |
672 | ffmpeg_enabled=1]) | 673 | ffmpeg_enabled=1]) |
673 | if test x$ffmpeg_enabled = x1 | 674 | AS_IF([test x$ffmpeg_enabled = x1], |
674 | then | 675 | [ffmpeg_enabled=0 |
675 | ffmpeg_enabled=0 | ||
676 | new_ffmpeg=0 | 676 | new_ffmpeg=0 |
677 | AC_CHECK_HEADERS([libavutil/avutil.h libavformat/avformat.h libavcodec/avcodec.h libavutil/frame.h], | 677 | AC_CHECK_HEADERS([libavutil/avutil.h libavformat/avformat.h libavcodec/avcodec.h libavutil/frame.h], |
678 | AC_CHECK_HEADERS([libavresample/avresample.h], | 678 | AC_CHECK_HEADERS([libavresample/avresample.h], |
@@ -683,7 +683,7 @@ then | |||
683 | AC_CHECK_LIB(avcodec, avcodec_alloc_context3, | 683 | AC_CHECK_LIB(avcodec, avcodec_alloc_context3, |
684 | ffmpeg_enabled=1)) | 684 | ffmpeg_enabled=1)) |
685 | AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h ffmpeg/swscale.h]) | 685 | AC_CHECK_HEADERS([libavutil/avutil.h ffmpeg/avutil.h libavformat/avformat.h ffmpeg/avformat.h libavcodec/avcodec.h ffmpeg/avcodec.h libswscale/swscale.h ffmpeg/swscale.h]) |
686 | fi | 686 | ]) |
687 | AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0) | 687 | AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0) |
688 | AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0) | 688 | AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0) |
689 | 689 | ||
diff --git a/src/include/extractor.h b/src/include/extractor.h index 37c9770..3e86868 100644 --- a/src/include/extractor.h +++ b/src/include/extractor.h | |||
@@ -35,10 +35,20 @@ extern "C" { | |||
35 | * 0.2.6-1 => 0x00020601 | 35 | * 0.2.6-1 => 0x00020601 |
36 | * 4.5.2-0 => 0x04050200 | 36 | * 4.5.2-0 => 0x04050200 |
37 | */ | 37 | */ |
38 | #define EXTRACTOR_VERSION 0x01080000 | 38 | #define EXTRACTOR_VERSION 0x01080001 |
39 | 39 | ||
40 | #include <stdio.h> | 40 | #include <stdio.h> |
41 | 41 | ||
42 | #ifndef _EXTRACTOR_EXTERN | ||
43 | #if defined(_WIN32) && defined(MHD_W32LIB) | ||
44 | #define _EXTRACTOR_EXTERN extern | ||
45 | #elif defined (_WIN32) && defined(MHD_W32DLL) | ||
46 | /* Define MHD_W32DLL when using MHD as W32 .DLL to speed up linker a little */ | ||
47 | #define _EXTRACTOR_EXTERN __declspec(dllimport) | ||
48 | #else | ||
49 | #define _EXTRACTOR_EXTERN extern | ||
50 | #endif | ||
51 | #endif | ||
42 | 52 | ||
43 | /** | 53 | /** |
44 | * Options for how plugin execution should be done. | 54 | * Options for how plugin execution should be done. |
@@ -402,7 +412,7 @@ enum EXTRACTOR_MetaType | |||
402 | * translate using `dgettext ("libextractor", rval)` | 412 | * translate using `dgettext ("libextractor", rval)` |
403 | * @ingroup types | 413 | * @ingroup types |
404 | */ | 414 | */ |
405 | const char * | 415 | _EXTRACTOR_EXTERN const char * |
406 | EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); | 416 | EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); |
407 | 417 | ||
408 | 418 | ||
@@ -415,7 +425,7 @@ EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); | |||
415 | * translate using `dgettext ("libextractor", rval)` | 425 | * translate using `dgettext ("libextractor", rval)` |
416 | * @ingroup types | 426 | * @ingroup types |
417 | */ | 427 | */ |
418 | const char * | 428 | _EXTRACTOR_EXTERN const char * |
419 | EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); | 429 | EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); |
420 | 430 | ||
421 | 431 | ||
@@ -425,7 +435,7 @@ EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); | |||
425 | * @return highest legal metatype number for this version of libextractor | 435 | * @return highest legal metatype number for this version of libextractor |
426 | * @ingroup types | 436 | * @ingroup types |
427 | */ | 437 | */ |
428 | enum EXTRACTOR_MetaType | 438 | _EXTRACTOR_EXTERN enum EXTRACTOR_MetaType |
429 | EXTRACTOR_metatype_get_max (void); | 439 | EXTRACTOR_metatype_get_max (void); |
430 | 440 | ||
431 | 441 | ||
@@ -557,7 +567,7 @@ struct EXTRACTOR_PluginList; | |||
557 | * @param flags options for all of the plugins loaded | 567 | * @param flags options for all of the plugins loaded |
558 | * @return the default set of plugins, NULL if no plugins were found | 568 | * @return the default set of plugins, NULL if no plugins were found |
559 | */ | 569 | */ |
560 | struct EXTRACTOR_PluginList * | 570 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
561 | EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); | 571 | EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); |
562 | 572 | ||
563 | 573 | ||
@@ -570,7 +580,7 @@ EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); | |||
570 | * @param flags options to use | 580 | * @param flags options to use |
571 | * @return the new list of libraries, equal to prev iff an error occured | 581 | * @return the new list of libraries, equal to prev iff an error occured |
572 | */ | 582 | */ |
573 | struct EXTRACTOR_PluginList * | 583 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
574 | EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, | 584 | EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, |
575 | const char *library, | 585 | const char *library, |
576 | const char *options, | 586 | const char *options, |
@@ -592,7 +602,7 @@ EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, | |||
592 | * @return the new list of libraries, equal to prev iff an error occured | 602 | * @return the new list of libraries, equal to prev iff an error occured |
593 | * or if config was empty (or NULL). | 603 | * or if config was empty (or NULL). |
594 | */ | 604 | */ |
595 | struct EXTRACTOR_PluginList * | 605 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
596 | EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, | 606 | EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, |
597 | const char *config, | 607 | const char *config, |
598 | enum EXTRACTOR_Options flags); | 608 | enum EXTRACTOR_Options flags); |
@@ -605,7 +615,7 @@ EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, | |||
605 | * @param library the name of the plugin to remove (short handle) | 615 | * @param library the name of the plugin to remove (short handle) |
606 | * @return the reduced list, unchanged if the plugin was not loaded | 616 | * @return the reduced list, unchanged if the plugin was not loaded |
607 | */ | 617 | */ |
608 | struct EXTRACTOR_PluginList * | 618 | _EXTRACTOR_EXTERN struct EXTRACTOR_PluginList * |
609 | EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, | 619 | EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, |
610 | const char *library); | 620 | const char *library); |
611 | 621 | ||
@@ -615,7 +625,7 @@ EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, | |||
615 | * | 625 | * |
616 | * @param plugin the list of plugins | 626 | * @param plugin the list of plugins |
617 | */ | 627 | */ |
618 | void | 628 | _EXTRACTOR_EXTERN void |
619 | EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); | 629 | EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); |
620 | 630 | ||
621 | 631 | ||
@@ -630,7 +640,7 @@ EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); | |||
630 | * @param proc function to call for each meta data item found | 640 | * @param proc function to call for each meta data item found |
631 | * @param proc_cls cls argument to @a proc | 641 | * @param proc_cls cls argument to @a proc |
632 | */ | 642 | */ |
633 | void | 643 | _EXTRACTOR_EXTERN void |
634 | EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, | 644 | EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, |
635 | const char *filename, | 645 | const char *filename, |
636 | const void *data, | 646 | const void *data, |
@@ -655,7 +665,7 @@ EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, | |||
655 | * @param data_len number of bytes in @a data | 665 | * @param data_len number of bytes in @a data |
656 | * @return non-zero if printing failed, otherwise 0. | 666 | * @return non-zero if printing failed, otherwise 0. |
657 | */ | 667 | */ |
658 | int | 668 | _EXTRACTOR_EXTERN int |
659 | EXTRACTOR_meta_data_print (void *handle, | 669 | EXTRACTOR_meta_data_print (void *handle, |
660 | const char *plugin_name, | 670 | const char *plugin_name, |
661 | enum EXTRACTOR_MetaType type, | 671 | enum EXTRACTOR_MetaType type, |
diff --git a/src/main/Makefile.am b/src/main/Makefile.am index 56ac9e9..32f28bd 100644 --- a/src/main/Makefile.am +++ b/src/main/Makefile.am | |||
@@ -3,11 +3,13 @@ SUBDIRS = . | |||
3 | 3 | ||
4 | AM_CPPFLAGS = -I$(top_srcdir)/src/include | 4 | AM_CPPFLAGS = -I$(top_srcdir)/src/include |
5 | 5 | ||
6 | AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS) | ||
7 | |||
6 | LIBS = \ | 8 | LIBS = \ |
7 | @LE_LIBINTL@ @LE_LIB_LIBS@ | 9 | @LE_LIBINTL@ @LE_LIB_LIBS@ |
8 | 10 | ||
9 | if USE_COVERAGE | 11 | if USE_COVERAGE |
10 | AM_CFLAGS = --coverage -O0 | 12 | AM_CFLAGS += --coverage -O0 |
11 | XLIB = -lgcov | 13 | XLIB = -lgcov |
12 | endif | 14 | endif |
13 | 15 | ||
diff --git a/src/main/test_extractor.c b/src/main/test_extractor.c index 52b1a59..8c15fca 100644 --- a/src/main/test_extractor.c +++ b/src/main/test_extractor.c | |||
@@ -36,7 +36,7 @@ | |||
36 | #include <unistd.h> | 36 | #include <unistd.h> |
37 | #include <stdlib.h> | 37 | #include <stdlib.h> |
38 | 38 | ||
39 | 39 | ||
40 | 40 | ||
41 | /** | 41 | /** |
42 | * Signature of the extract method that each plugin | 42 | * Signature of the extract method that each plugin |
@@ -44,7 +44,7 @@ | |||
44 | * | 44 | * |
45 | * @param ec extraction context provided to the plugin | 45 | * @param ec extraction context provided to the plugin |
46 | */ | 46 | */ |
47 | void | 47 | _EXTRACTOR_EXTERN void |
48 | EXTRACTOR_test_extract_method (struct EXTRACTOR_ExtractContext *ec) | 48 | EXTRACTOR_test_extract_method (struct EXTRACTOR_ExtractContext *ec) |
49 | { | 49 | { |
50 | void *dp; | 50 | void *dp; |
@@ -54,19 +54,19 @@ EXTRACTOR_test_extract_method (struct EXTRACTOR_ExtractContext *ec) | |||
54 | if (4 != ec->read (ec->cls, &dp, 4)) | 54 | if (4 != ec->read (ec->cls, &dp, 4)) |
55 | { | 55 | { |
56 | fprintf (stderr, "Reading at offset 0 failed\n"); | 56 | fprintf (stderr, "Reading at offset 0 failed\n"); |
57 | ABORT (); | 57 | ABORT (); |
58 | } | 58 | } |
59 | if (0 != strncmp ("test", dp, 4)) | 59 | if (0 != strncmp ("test", dp, 4)) |
60 | { | 60 | { |
61 | fprintf (stderr, "Unexpected data at offset 0\n"); | 61 | fprintf (stderr, "Unexpected data at offset 0\n"); |
62 | ABORT (); | 62 | ABORT (); |
63 | } | 63 | } |
64 | if ( (1024 * 150 != ec->get_size (ec->cls)) && | 64 | if ( (1024 * 150 != ec->get_size (ec->cls)) && |
65 | (UINT64_MAX != ec->get_size (ec->cls)) ) | 65 | (UINT64_MAX != ec->get_size (ec->cls)) ) |
66 | { | 66 | { |
67 | fprintf (stderr, "Unexpected file size returned (expected 150k)\n"); | 67 | fprintf (stderr, "Unexpected file size returned (expected 150k)\n"); |
68 | ABORT (); | 68 | ABORT (); |
69 | } | 69 | } |
70 | if (1024 * 100 + 4 != ec->seek (ec->cls, 1024 * 100 + 4, SEEK_SET)) | 70 | if (1024 * 100 + 4 != ec->seek (ec->cls, 1024 * 100 + 4, SEEK_SET)) |
71 | { | 71 | { |
72 | fprintf (stderr, "Failure to seek (SEEK_SET)\n"); | 72 | fprintf (stderr, "Failure to seek (SEEK_SET)\n"); |