Browse code

use same symbols as 0.95 for libclamunrar_iface (bb #1535).

git-svn: trunk@5018

Török Edvin authored on 2009/04/03 17:27:06
Showing 6 changed files
... ...
@@ -1,3 +1,10 @@
1
+Fri Apr  3 11:25:08 EEST 2009 (edwin)
2
+-------------------------------------
3
+ * configure, configure.in, libclamav/others.c,
4
+ libclamunrar_iface/libclamunrar_iface.map,
5
+ libclamunrar_iface/unrar_iface.h: use same symbols as 0.95 for
6
+ libclamunrar_iface (bb #1535).
7
+
1 8
 Thu Apr  2 23:53:47 EEST 2009 (edwin)
2 9
 -------------------------------------
3 10
  * libclamav/jsparse/js-norm.c: fix possible signedness issue (thanks
... ...
@@ -3002,16 +3002,6 @@ LC_AGE=0
3002 3002
 LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
3003 3003
 
3004 3004
 
3005
-cat >>confdefs.h <<_ACEOF
3006
-#define LIBCLAMAV_FULLVER "$LC_CURRENT.$LC_AGE.$LC_REVISION"
3007
-_ACEOF
3008
-
3009
-
3010
-cat >>confdefs.h <<_ACEOF
3011
-#define LIBCLAMAV_MAJORVER "$LC_CURRENT"
3012
-_ACEOF
3013
-
3014
-
3015 3005
 for ac_prog in gawk mawk nawk awk
3016 3006
 do
3017 3007
   # Extract the first word of "$ac_prog", so it can be a program name with args.
... ...
@@ -4920,13 +4910,13 @@ if test "${lt_cv_nm_interface+set}" = set; then
4920 4920
 else
4921 4921
   lt_cv_nm_interface="BSD nm"
4922 4922
   echo "int some_variable = 0;" > conftest.$ac_ext
4923
-  (eval echo "\"\$as_me:4923: $ac_compile\"" >&5)
4923
+  (eval echo "\"\$as_me:4913: $ac_compile\"" >&5)
4924 4924
   (eval "$ac_compile" 2>conftest.err)
4925 4925
   cat conftest.err >&5
4926
-  (eval echo "\"\$as_me:4926: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4926
+  (eval echo "\"\$as_me:4916: $NM \\\"conftest.$ac_objext\\\"\"" >&5)
4927 4927
   (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out)
4928 4928
   cat conftest.err >&5
4929
-  (eval echo "\"\$as_me:4929: output\"" >&5)
4929
+  (eval echo "\"\$as_me:4919: output\"" >&5)
4930 4930
   cat conftest.out >&5
4931 4931
   if $GREP 'External.*some_variable' conftest.out > /dev/null; then
4932 4932
     lt_cv_nm_interface="MS dumpbin"
... ...
@@ -6121,7 +6111,7 @@ ia64-*-hpux*)
6121 6121
   ;;
6122 6122
 *-*-irix6*)
6123 6123
   # Find out which ABI we are using.
6124
-  echo '#line 6124 "configure"' > conftest.$ac_ext
6124
+  echo '#line 6114 "configure"' > conftest.$ac_ext
6125 6125
   if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
6126 6126
   (eval $ac_compile) 2>&5
6127 6127
   ac_status=$?
... ...
@@ -7977,11 +7967,11 @@ else
7977 7977
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
7978 7978
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
7979 7979
    -e 's:$: $lt_compiler_flag:'`
7980
-   (eval echo "\"\$as_me:7980: $lt_compile\"" >&5)
7980
+   (eval echo "\"\$as_me:7970: $lt_compile\"" >&5)
7981 7981
    (eval "$lt_compile" 2>conftest.err)
7982 7982
    ac_status=$?
7983 7983
    cat conftest.err >&5
7984
-   echo "$as_me:7984: \$? = $ac_status" >&5
7984
+   echo "$as_me:7974: \$? = $ac_status" >&5
7985 7985
    if (exit $ac_status) && test -s "$ac_outfile"; then
7986 7986
      # The compiler can only warn and ignore the option if not recognized
7987 7987
      # So say no if there are warnings other than the usual output.
... ...
@@ -8316,11 +8306,11 @@ else
8316 8316
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8317 8317
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8318 8318
    -e 's:$: $lt_compiler_flag:'`
8319
-   (eval echo "\"\$as_me:8319: $lt_compile\"" >&5)
8319
+   (eval echo "\"\$as_me:8309: $lt_compile\"" >&5)
8320 8320
    (eval "$lt_compile" 2>conftest.err)
8321 8321
    ac_status=$?
8322 8322
    cat conftest.err >&5
8323
-   echo "$as_me:8323: \$? = $ac_status" >&5
8323
+   echo "$as_me:8313: \$? = $ac_status" >&5
8324 8324
    if (exit $ac_status) && test -s "$ac_outfile"; then
8325 8325
      # The compiler can only warn and ignore the option if not recognized
8326 8326
      # So say no if there are warnings other than the usual output.
... ...
@@ -8421,11 +8411,11 @@ else
8421 8421
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8422 8422
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8423 8423
    -e 's:$: $lt_compiler_flag:'`
8424
-   (eval echo "\"\$as_me:8424: $lt_compile\"" >&5)
8424
+   (eval echo "\"\$as_me:8414: $lt_compile\"" >&5)
8425 8425
    (eval "$lt_compile" 2>out/conftest.err)
8426 8426
    ac_status=$?
8427 8427
    cat out/conftest.err >&5
8428
-   echo "$as_me:8428: \$? = $ac_status" >&5
8428
+   echo "$as_me:8418: \$? = $ac_status" >&5
8429 8429
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8430 8430
    then
8431 8431
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -8476,11 +8466,11 @@ else
8476 8476
    -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \
8477 8477
    -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \
8478 8478
    -e 's:$: $lt_compiler_flag:'`
8479
-   (eval echo "\"\$as_me:8479: $lt_compile\"" >&5)
8479
+   (eval echo "\"\$as_me:8469: $lt_compile\"" >&5)
8480 8480
    (eval "$lt_compile" 2>out/conftest.err)
8481 8481
    ac_status=$?
8482 8482
    cat out/conftest.err >&5
8483
-   echo "$as_me:8483: \$? = $ac_status" >&5
8483
+   echo "$as_me:8473: \$? = $ac_status" >&5
8484 8484
    if (exit $ac_status) && test -s out/conftest2.$ac_objext
8485 8485
    then
8486 8486
      # The compiler can only warn and ignore the option if not recognized
... ...
@@ -11289,7 +11279,7 @@ else
11289 11289
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11290 11290
   lt_status=$lt_dlunknown
11291 11291
   cat > conftest.$ac_ext <<_LT_EOF
11292
-#line 11292 "configure"
11292
+#line 11282 "configure"
11293 11293
 #include "confdefs.h"
11294 11294
 
11295 11295
 #if HAVE_DLFCN_H
... ...
@@ -11385,7 +11375,7 @@ else
11385 11385
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
11386 11386
   lt_status=$lt_dlunknown
11387 11387
   cat > conftest.$ac_ext <<_LT_EOF
11388
-#line 11388 "configure"
11388
+#line 11378 "configure"
11389 11389
 #include "confdefs.h"
11390 11390
 
11391 11391
 #if HAVE_DLFCN_H
... ...
@@ -12536,7 +12526,7 @@ else
12536 12536
   lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
12537 12537
   lt_status=$lt_dlunknown
12538 12538
   cat > conftest.$ac_ext <<_LT_EOF
12539
-#line 12539 "configure"
12539
+#line 12529 "configure"
12540 12540
 #include "confdefs.h"
12541 12541
 
12542 12542
 #if HAVE_DLFCN_H
... ...
@@ -13759,6 +13749,17 @@ LTDLOPEN=`eval "\\$ECHO \"$libname_spec\""`
13759 13759
 ac_config_files="$ac_config_files libltdl/Makefile"
13760 13760
 
13761 13761
 
13762
+major=`expr $LC_CURRENT - $LC_AGE`
13763
+
13764
+cat >>confdefs.h <<_ACEOF
13765
+#define LIBCLAMAV_FULLVER "$major.$LC_AGE.$LC_REVISION"
13766
+_ACEOF
13767
+
13768
+
13769
+cat >>confdefs.h <<_ACEOF
13770
+#define LIBCLAMAV_MAJORVER $major
13771
+_ACEOF
13772
+
13762 13773
 
13763 13774
 cat >>confdefs.h <<\_ACEOF
13764 13775
 #define SCANBUFF 131072
... ...
@@ -48,10 +48,6 @@ LC_REVISION=2
48 48
 LC_AGE=0
49 49
 LIBCLAMAV_VERSION="$LC_CURRENT":"$LC_REVISION":"$LC_AGE"
50 50
 AC_SUBST([LIBCLAMAV_VERSION])
51
-AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$LC_CURRENT.$LC_AGE.$LC_REVISION",
52
-	  ["Full library version number"])
53
-AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], "$LC_CURRENT",
54
-	  ["Major library version number"])
55 51
 
56 52
 AC_PROG_AWK
57 53
 AC_PROG_INSTALL
... ...
@@ -63,6 +59,11 @@ LT_INIT([dlopen])
63 63
 LTDL_INIT([recursive])
64 64
 AC_CONFIG_FILES([libltdl/Makefile])
65 65
 
66
+major=`expr $LC_CURRENT - $LC_AGE`
67
+AC_DEFINE_UNQUOTED([LIBCLAMAV_FULLVER], "$major.$LC_AGE.$LC_REVISION",
68
+	  ["Full library version number"])
69
+AC_DEFINE_UNQUOTED([LIBCLAMAV_MAJORVER], $major,
70
+	  ["Major library version number"])
66 71
 AC_DEFINE([SCANBUFF], 131072, [scan buffer size])
67 72
 AC_DEFINE([FILEBUFF], 8192,   [file i/o buffer size])
68 73
 
... ...
@@ -118,11 +118,13 @@ static int lt_init(void) {
118 118
     return 0;
119 119
 }
120 120
 
121
+#define PASTE(a,b) a#b
122
+
121 123
 static lt_dlhandle lt_dlfind(const char *name, const char *featurename)
122 124
 {
123 125
     static const char *suffixes[] = {
124 126
 	LT_MODULE_EXT"."LIBCLAMAV_FULLVER,
125
-	LT_MODULE_EXT"."LIBCLAMAV_MAJORVER,
127
+	PASTE(LT_MODULE_EXT".", LIBCLAMAV_MAJORVER),
126 128
 	LT_MODULE_EXT,
127 129
 	"."LT_LIBEXT
128 130
     };
... ...
@@ -178,10 +180,10 @@ static void cli_rarload(void) {
178 178
     if (!rhandle)
179 179
 	return;
180 180
 
181
-    if (!(cli_unrar_open = (int(*)(int, const char *, unrar_state_t *))lt_dlsym(rhandle, "unrar_open")) ||
182
-	!(cli_unrar_extract_next_prepare = (int(*)(unrar_state_t *, const char *))lt_dlsym(rhandle, "unrar_extract_next_prepare")) ||
183
-	!(cli_unrar_extract_next = (int(*)(unrar_state_t *, const char *))lt_dlsym(rhandle, "unrar_extract_next")) ||
184
-	!(cli_unrar_close = (void(*)(unrar_state_t *))lt_dlsym(rhandle, "unrar_close"))
181
+    if (!(cli_unrar_open = (int(*)(int, const char *, unrar_state_t *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_open")) ||
182
+	!(cli_unrar_extract_next_prepare = (int(*)(unrar_state_t *, const char *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_extract_next_prepare")) ||
183
+	!(cli_unrar_extract_next = (int(*)(unrar_state_t *, const char *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_extract_next")) ||
184
+	!(cli_unrar_close = (void(*)(unrar_state_t *))lt_dlsym(rhandle, "libclamunrar_iface_LTX_unrar_close"))
185 185
 	) {
186 186
 	/* ideally we should never land here, we'd better warn so */
187 187
         cli_warnmsg("Cannot resolve: %s (version mismatch?) - unrar support unavailable\n", lt_dlerror());
... ...
@@ -1,9 +1,9 @@
1 1
 CLAMAV_PRIVATE {
2 2
 	global:
3
-		unrar_open;
4
-		unrar_extract_next;
5
-		unrar_extract_next_prepare;
6
-		unrar_close;
3
+		libclamunrar_iface_LTX_unrar_open;
4
+		libclamunrar_iface_LTX_unrar_extract_next;
5
+		libclamunrar_iface_LTX_unrar_extract_next_prepare;
6
+		libclamunrar_iface_LTX_unrar_close;
7 7
 	local:
8 8
 		*;
9 9
 };
... ...
@@ -24,6 +24,11 @@
24 24
 #include "clamav-config.h"
25 25
 #endif
26 26
 
27
+#define unrar_open libclamunrar_iface_LTX_unrar_open
28
+#define unrar_extract_next_prepare libclamunrar_iface_LTX_unrar_extract_next_prepare
29
+#define unrar_extract_next libclamunrar_iface_LTX_unrar_extract_next
30
+#define unrar_close libclamunrar_iface_LTX_unrar_close
31
+
27 32
 #ifndef HAVE_ATTRIB_PACKED
28 33
 #define __attribute__(x)
29 34
 #endif