aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2018-12-02 12:09:09 +0100
committerChristian Grothoff <christian@grothoff.org>2018-12-02 12:09:09 +0100
commitfff067577af897c6e4f4b7886aec56c4870ced56 (patch)
tree7521c652b19745c610eaca72c94994e1b2d175a3
parentba76cc56c02b7ea362136bce5b6ce9e1ce82c4de (diff)
downloadlibextractor-fff067577af897c6e4f4b7886aec56c4870ced56.tar.gz
libextractor-fff067577af897c6e4f4b7886aec56c4870ced56.zip
fix #5488
-rw-r--r--.gitignore13
-rw-r--r--ChangeLog3
-rw-r--r--configure.ac118
-rw-r--r--src/include/extractor.h32
-rw-r--r--src/main/Makefile.am4
-rw-r--r--src/main/test_extractor.c12
6 files changed, 93 insertions, 89 deletions
diff --git a/.gitignore b/.gitignore
index 48396d8..e508732 100644
--- a/.gitignore
+++ b/.gitignore
@@ -45,19 +45,8 @@ out
45po/Makefile 45po/Makefile
46po/Makefile.in 46po/Makefile.in
47po/POTFILES 47po/POTFILES
48po/de.gmo 48po/*.gmo
49po/fr.gmo
50po/ga.gmo
51po/it.gmo
52po/nl.gmo
53po/pl.gmo
54po/ro.gmo
55po/rw.gmo
56po/stamp-po 49po/stamp-po
57po/sr.gmo
58po/sv.gmo
59po/uk.gmo
60po/vi.gmo
61src/Makefile 50src/Makefile
62src/Makefile.in 51src/Makefile.in
63src/common/.deps/ 52src/common/.deps/
diff --git a/ChangeLog b/ChangeLog
index 8f2a19c..4aa1a0d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,6 @@
1Sun Dec 2 12:05:33 CET 2018
2 Fix #5488: do not export non-public functions from API. -CG
3
1Sun Nov 18 11:19:28 CET 2018 4Sun 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
214if gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1; 211AS_IF([gcc -fno-strict-aliasing -S -o /dev/null -xc /dev/null >/dev/null 2>&1],
215then 212 [AM_CFLAGS="-fno-strict-aliasing $AM_CFLAGS"])
216 AM_CFLAGS="-fno-strict-aliasing $AM_CFLAGS"
217fi
218 213
219AM_CONDITIONAL(HAVE_CXX, test "x$HAVE_CXX" = "xyes") 214AM_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
224AC_ARG_ENABLE(gcc-hardening, 219AC_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"])])
231fi])
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
236AC_ARG_ENABLE(linker-hardening, 230AC_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"])])
240fi]) 234
235
236# Support for hiding non-public symbols
237HIDDEN_VISIBILITY_CFLAGS=""
238case "$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 ;;
253esac
254AC_SUBST(HIDDEN_VISIBILITY_CFLAGS)
255
241 256
242 257
243# Checks for libraries. 258# Checks for libraries.
244 259
245AC_CHECK_HEADERS(langinfo.h) 260AC_CHECK_HEADERS([langinfo.h])
246 261
247# Check for libltdl header (#2999) 262# Check for libltdl header (#2999)
248ltdl=0 263ltdl=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))])
277if test x$ltdl = x1 292AS_IF([test x$ltdl = x1],
278then 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])])
280else
281 AC_MSG_ERROR([libextractor requires libltdl (from GNU libtool), try installing libltdl-dev])
282fi
283 295
284# check for apparmor 296# check for apparmor
285AC_CHECK_LIB(apparmor, aa_change_profile, 297AC_CHECK_LIB(apparmor, aa_change_profile,
@@ -542,10 +554,8 @@ AC_LINK_IFELSE(
542LIBS="$SAVED_LIBS $SOCKET_LIBS" 554LIBS="$SAVED_LIBS $SOCKET_LIBS"
543AC_LANG_POP(C) 555AC_LANG_POP(C)
544AC_MSG_RESULT([$sockets]) 556AC_MSG_RESULT([$sockets])
545if test "x$sockets" = "xno" 557AS_IF([test "x$sockets" = "xno"],
546then 558 [AC_MSG_ERROR([libextractor requires some kind of socket library])])
547 AC_MSG_ERROR([libextractor requires some kind of socket library])
548fi
549AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS]) 559AC_SUBST([SOCKET_LIBS],[$SOCKET_LIBS])
550 560
551LE_LIB_LIBS=$LIBS 561LE_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
577if test x$without_glib != xtrue 587AS_IF([test x$without_glib != xtrue],
578then 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
589else
590 AM_CONDITIONAL(HAVE_GLIB,false)
591 AC_DEFINE(HAVE_GLIB, 0, [Have glib])
592fi
593 597
594# smf requires glib.h 598# smf requires glib.h
595CFLAGS_OLD="$CFLAGS" 599CFLAGS_OLD="$CFLAGS"
@@ -609,13 +613,10 @@ AC_MSG_CHECKING(for gdk-pixbuf)
609PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no]) 613PKG_CHECK_MODULES([GDK_PIXBUF], [gdk-pixbuf-2.0 >= 2.4], [have_gdk_pixbuf=yes], [have_gdk_pixbuf=no])
610 614
611AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno) 615AM_CONDITIONAL(HAVE_GDK_PIXBUF, test x$have_gdk_pixbuf != xno)
612if test $have_gdk_pixbuf != no 616AS_IF([test $have_gdk_pixbuf != no],
613then 617 [have_gdk_pixbuf=1],
614 have_gdk_pixbuf=1 618 [have_gdk_pixbuf=0
615else 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?])
618fi
619AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf]) 620AC_DEFINE_UNQUOTED([HAVE_GDK_PIXBUF], [$have_gdk_pixbuf], [We have Gdk-pixbuf])
620 621
621CFLAGS="$CFLAGS $GDK_PIXBUF_CFLAGS" 622CFLAGS="$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])
673if test x$ffmpeg_enabled = x1 674AS_IF([test x$ffmpeg_enabled = x1],
674then 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])
686fi 686 ])
687AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0) 687AM_CONDITIONAL(HAVE_FFMPEG, test x$ffmpeg_enabled != x0)
688AM_CONDITIONAL(HAVE_FFMPEG_NEW, test x$new_ffmpeg != x0) 688AM_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 */
405const char * 415_EXTRACTOR_EXTERN const char *
406EXTRACTOR_metatype_to_string (enum EXTRACTOR_MetaType type); 416EXTRACTOR_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 */
418const char * 428_EXTRACTOR_EXTERN const char *
419EXTRACTOR_metatype_to_description (enum EXTRACTOR_MetaType type); 429EXTRACTOR_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 */
428enum EXTRACTOR_MetaType 438_EXTRACTOR_EXTERN enum EXTRACTOR_MetaType
429EXTRACTOR_metatype_get_max (void); 439EXTRACTOR_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 */
560struct EXTRACTOR_PluginList * 570_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
561EXTRACTOR_plugin_add_defaults (enum EXTRACTOR_Options flags); 571EXTRACTOR_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 */
573struct EXTRACTOR_PluginList * 583_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
574EXTRACTOR_plugin_add (struct EXTRACTOR_PluginList * prev, 584EXTRACTOR_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 */
595struct EXTRACTOR_PluginList * 605_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
596EXTRACTOR_plugin_add_config (struct EXTRACTOR_PluginList *prev, 606EXTRACTOR_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 */
608struct EXTRACTOR_PluginList * 618_EXTRACTOR_EXTERN struct EXTRACTOR_PluginList *
609EXTRACTOR_plugin_remove (struct EXTRACTOR_PluginList *prev, 619EXTRACTOR_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 */
618void 628_EXTRACTOR_EXTERN void
619EXTRACTOR_plugin_remove_all (struct EXTRACTOR_PluginList *plugins); 629EXTRACTOR_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 */
633void 643_EXTRACTOR_EXTERN void
634EXTRACTOR_extract (struct EXTRACTOR_PluginList *plugins, 644EXTRACTOR_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 */
658int 668_EXTRACTOR_EXTERN int
659EXTRACTOR_meta_data_print (void *handle, 669EXTRACTOR_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
4AM_CPPFLAGS = -I$(top_srcdir)/src/include 4AM_CPPFLAGS = -I$(top_srcdir)/src/include
5 5
6AM_CFLAGS = $(HIDDEN_VISIBILITY_CFLAGS)
7
6LIBS = \ 8LIBS = \
7 @LE_LIBINTL@ @LE_LIB_LIBS@ 9 @LE_LIBINTL@ @LE_LIB_LIBS@
8 10
9if USE_COVERAGE 11if USE_COVERAGE
10 AM_CFLAGS = --coverage -O0 12 AM_CFLAGS += --coverage -O0
11 XLIB = -lgcov 13 XLIB = -lgcov
12endif 14endif
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 */
47void 47_EXTRACTOR_EXTERN void
48EXTRACTOR_test_extract_method (struct EXTRACTOR_ExtractContext *ec) 48EXTRACTOR_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");