aboutsummaryrefslogtreecommitdiff
path: root/libjava
diff options
context:
space:
mode:
authorAndrew Haley <aph@redhat.com>2007-01-25 19:51:33 +0000
committerTom Tromey <tromey@gcc.gnu.org>2007-01-25 19:51:33 +0000
commit9fe944471ab5828c0e4564780a57173a70cc4506 (patch)
tree248bb6af58d66aec13f6a02b9c0cce7a33cb29a2 /libjava
parenta942e89f3acac05d7099f3ae12ee6a6fd531a051 (diff)
downloadgcc-9fe944471ab5828c0e4564780a57173a70cc4506.zip
gcc-9fe944471ab5828c0e4564780a57173a70cc4506.tar.gz
gcc-9fe944471ab5828c0e4564780a57173a70cc4506.tar.bz2
configure, [...]: Rebuilt.
2007-01-25 Andrew Haley <aph@redhat.com> * configure, Makefile.in, include/config.h.in: Rebuilt. * Makefile.am (libgcj_la_LIBADD): Removed $(LIBMAGIC). * configure.ac: Don't check for libmagic. * java/net/natVMURLConnection.cc (p_magic_open, p_magic_load, p_magic_close, p_magic_buffer): New globals. (init): Look up 'magic' functions. (guessContentTypeFromBuffer): Updated. From-SVN: r121183
Diffstat (limited to 'libjava')
-rw-r--r--libjava/ChangeLog10
-rw-r--r--libjava/Makefile.am2
-rw-r--r--libjava/Makefile.in3
-rwxr-xr-xlibjava/configure85
-rw-r--r--libjava/configure.ac6
-rw-r--r--libjava/gcj/Makefile.in1
-rw-r--r--libjava/include/Makefile.in1
-rw-r--r--libjava/include/config.h.in3
-rw-r--r--libjava/java/net/natVMURLConnection.cc47
-rw-r--r--libjava/testsuite/Makefile.in1
10 files changed, 49 insertions, 110 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog
index 6552705..eb99fdf1 100644
--- a/libjava/ChangeLog
+++ b/libjava/ChangeLog
@@ -1,3 +1,13 @@
+2007-01-25 Andrew Haley <aph@redhat.com>
+
+ * configure, Makefile.in, include/config.h.in: Rebuilt.
+ * Makefile.am (libgcj_la_LIBADD): Removed $(LIBMAGIC).
+ * configure.ac: Don't check for libmagic.
+ * java/net/natVMURLConnection.cc (p_magic_open, p_magic_load,
+ p_magic_close, p_magic_buffer): New globals.
+ (init): Look up 'magic' functions.
+ (guessContentTypeFromBuffer): Updated.
+
2007-01-25 Keith Seitz <keiths@redhat.com>
* jvmti.cc (_Jv_JVMTI_GetMethodName): New function.
diff --git a/libjava/Makefile.am b/libjava/Makefile.am
index 2b75f9d..ba89341 100644
--- a/libjava/Makefile.am
+++ b/libjava/Makefile.am
@@ -240,7 +240,7 @@ libgcj_la_LIBADD = \
$(all_packages_source_files:.list=.lo) \
$(bc_objects) \
$(propertyo_files) \
- $(LIBMAGIC) $(LIBFFI) $(ZLIBS) $(GCLIBS)
+ $(LIBFFI) $(ZLIBS) $(GCLIBS)
libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
java/lang/Object.lo \
java/lang/Class.lo \
diff --git a/libjava/Makefile.in b/libjava/Makefile.in
index 566702c..e0de8b9 100644
--- a/libjava/Makefile.in
+++ b/libjava/Makefile.in
@@ -626,7 +626,6 @@ LIBGCJ_LD_SYMBOLIC_FUNCTIONS = @LIBGCJ_LD_SYMBOLIC_FUNCTIONS@
LIBGCJ_SPEC = @LIBGCJ_SPEC@
LIBICONV = @LIBICONV@
LIBLTDL = @LIBLTDL@
-LIBMAGIC = @LIBMAGIC@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
@@ -887,7 +886,7 @@ libgcj_la_LIBADD = \
$(all_packages_source_files:.list=.lo) \
$(bc_objects) \
$(propertyo_files) \
- $(LIBMAGIC) $(LIBFFI) $(ZLIBS) $(GCLIBS)
+ $(LIBFFI) $(ZLIBS) $(GCLIBS)
libgcj_la_DEPENDENCIES = libgcj-$(gcc_version).jar \
java/lang/Object.lo \
diff --git a/libjava/configure b/libjava/configure
index 6b4dc62..db618907 100755
--- a/libjava/configure
+++ b/libjava/configure
@@ -310,7 +310,7 @@ ac_includes_default="\
# include <unistd.h>
#endif"
-ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP BASH_JAR_TRUE BASH_JAR_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV LIBMAGIC PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
+ac_subst_vars='SHELL PATH_SEPARATOR PACKAGE_NAME PACKAGE_TARNAME PACKAGE_VERSION PACKAGE_STRING PACKAGE_BUGREPORT exec_prefix prefix program_transform_name bindir sbindir libexecdir datadir sysconfdir sharedstatedir localstatedir libdir includedir oldincludedir infodir mandir build_alias host_alias target_alias DEFS ECHO_C ECHO_N ECHO_T LIBS build build_cpu build_vendor build_os build_libsubdir build_subdir host_subdir target_subdir multi_basedir host host_cpu host_vendor host_os target target_cpu target_vendor target_os target_noncanonical LN_S mkinstalldirs JAVA_MAINTAINER_MODE_TRUE JAVA_MAINTAINER_MODE_FALSE CC ac_ct_CC EXEEXT OBJEXT CXX ac_ct_CXX CFLAGS CXXFLAGS LDFLAGS INSTALL_PROGRAM INSTALL_SCRIPT INSTALL_DATA CYGPATH_W PACKAGE VERSION ACLOCAL AUTOCONF AUTOMAKE AUTOHEADER MAKEINFO install_sh STRIP ac_ct_STRIP INSTALL_STRIP_PROGRAM mkdir_p AWK SET_MAKE am__leading_dot AMTAR am__tar am__untar DEPDIR am__include am__quote AMDEP_TRUE AMDEP_FALSE AMDEPBACKSLASH CCDEPMODE am__fastdepCC_TRUE am__fastdepCC_FALSE CXXDEPMODE am__fastdepCXX_TRUE am__fastdepCXX_FALSE AS ac_ct_AS LD ac_ct_LD AR ac_ct_AR RANLIB ac_ct_RANLIB JAR ZIP UNZIP BASH_JAR_TRUE BASH_JAR_FALSE MAINTAINER_MODE_TRUE MAINTAINER_MODE_FALSE MAINT LIBGCJ_CFLAGS LIBGCJ_CXXFLAGS LIBGCJ_JAVAFLAGS LIBGCJ_LD_SYMBOLIC LIBGCJ_LD_SYMBOLIC_FUNCTIONS LIBGCJDEBUG TOOLKIT XLIB_AWT_TRUE XLIB_AWT_FALSE X_AWT_TRUE X_AWT_FALSE GCJ_FOR_ECJX GCJH host_exeext INCLTDL LIBLTDL DIRLTDL LIBTOOL CXXCPP CPPFLAGS GCJ GCJFLAGS GCJDEPMODE am__fastdepGCJ_TRUE am__fastdepGCJ_FALSE subdirs TESTSUBDIR_TRUE TESTSUBDIR_FALSE ECJ_BUILD_JAR ECJ_JAR BUILD_ECJ1_TRUE BUILD_ECJ1_FALSE INSTALL_ECJ_JAR_TRUE INSTALL_ECJ_JAR_FALSE JAVA_HOME_SET_TRUE JAVA_HOME_SET_FALSE JAVA_HOME INTERPRETER LIBFFI LIBFFIINCS PLATFORM CPP EGREP USING_WIN32_PLATFORM_TRUE USING_WIN32_PLATFORM_FALSE USING_POSIX_PLATFORM_TRUE USING_POSIX_PLATFORM_FALSE USING_DARWIN_CRT_TRUE USING_DARWIN_CRT_FALSE SYSTEMSPEC LIBGCJTESTSPEC ZLIBSPEC ZLIBTESTSPEC X_CFLAGS X_PRE_LIBS X_LIBS X_EXTRA_LIBS extra_ldflags_libjava GCLIBS GCINCS GCDEPS GCSPEC JC1GCSPEC GCTESTSPEC USING_BOEHMGC_TRUE USING_BOEHMGC_FALSE USING_NOGC_TRUE USING_NOGC_FALSE THREADLIBS THREADINCS THREADDEPS THREADSPEC THREADSTARTFILESPEC THREADLDFLAGS THREADCXXFLAGS USING_POSIX_THREADS_TRUE USING_POSIX_THREADS_FALSE USING_WIN32_THREADS_TRUE USING_WIN32_THREADS_FALSE USING_NO_THREADS_TRUE USING_NO_THREADS_FALSE USE_LIBGCJ_BC_TRUE USE_LIBGCJ_BC_FALSE LIBGCJ_SPEC HASH_SYNC_SPEC USING_GCC_TRUE USING_GCC_FALSE LIBICONV LTLIBICONV PKG_CONFIG GTK_CFLAGS GTK_LIBS GLIB_CFLAGS GLIB_LIBS LIBART_CFLAGS LIBART_LIBS CLASSPATH_SEPARATOR ac_ct_GCJ ZLIBS SYS_ZLIBS ZINCS DIVIDESPEC CHECKREFSPEC EXCEPTIONSPEC BACKTRACESPEC IEEESPEC NATIVE_TRUE NATIVE_FALSE ENABLE_SHARED_TRUE ENABLE_SHARED_FALSE NEEDS_DATA_START_TRUE NEEDS_DATA_START_FALSE GCC_UNWIND_INCLUDE toolexecdir toolexecmainlibdir toolexeclibdir dbexecdir GCJVERSION gxx_include_dir libstdcxx_incdir ALLOCA PERL SYSDEP_SOURCES LD_START_STATIC_SPEC LD_FINISH_STATIC_SPEC here LIBOBJS LTLIBOBJS'
ac_subst_files=''
# Initialize some variables set by options.
@@ -13919,88 +13919,6 @@ fi
fi
- LIBMAGIC=
- echo "$as_me:$LINENO: checking for magic_open in -lmagic" >&5
-echo $ECHO_N "checking for magic_open in -lmagic... $ECHO_C" >&6
-if test "${ac_cv_lib_magic_magic_open+set}" = set; then
- echo $ECHO_N "(cached) $ECHO_C" >&6
-else
- ac_check_lib_save_LIBS=$LIBS
-LIBS="-lmagic $LIBS"
-if test x$gcc_no_link = xyes; then
- { { echo "$as_me:$LINENO: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&5
-echo "$as_me: error: Link tests are not allowed after GCC_NO_EXECUTABLES." >&2;}
- { (exit 1); exit 1; }; }
-fi
-cat >conftest.$ac_ext <<_ACEOF
-/* confdefs.h. */
-_ACEOF
-cat confdefs.h >>conftest.$ac_ext
-cat >>conftest.$ac_ext <<_ACEOF
-/* end confdefs.h. */
-
-/* Override any gcc2 internal prototype to avoid an error. */
-#ifdef __cplusplus
-extern "C"
-#endif
-/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char magic_open ();
-int
-main ()
-{
-magic_open ();
- ;
- return 0;
-}
-_ACEOF
-rm -f conftest.$ac_objext conftest$ac_exeext
-if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
- (eval $ac_link) 2>conftest.er1
- ac_status=$?
- grep -v '^ *+' conftest.er1 >conftest.err
- rm -f conftest.er1
- cat conftest.err >&5
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); } &&
- { ac_try='test -z "$ac_c_werror_flag"
- || test ! -s conftest.err'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; } &&
- { ac_try='test -s conftest$ac_exeext'
- { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
- (eval $ac_try) 2>&5
- ac_status=$?
- echo "$as_me:$LINENO: \$? = $ac_status" >&5
- (exit $ac_status); }; }; then
- ac_cv_lib_magic_magic_open=yes
-else
- echo "$as_me: failed program was:" >&5
-sed 's/^/| /' conftest.$ac_ext >&5
-
-ac_cv_lib_magic_magic_open=no
-fi
-rm -f conftest.err conftest.$ac_objext \
- conftest$ac_exeext conftest.$ac_ext
-LIBS=$ac_check_lib_save_LIBS
-fi
-echo "$as_me:$LINENO: result: $ac_cv_lib_magic_magic_open" >&5
-echo "${ECHO_T}$ac_cv_lib_magic_magic_open" >&6
-if test $ac_cv_lib_magic_magic_open = yes; then
-
-
-cat >>confdefs.h <<\_ACEOF
-#define HAVE_MAGIC_OPEN 1
-_ACEOF
-
- LIBMAGIC="-lmagic"
-fi
-
-
-
# Test for Gtk stuff, if asked for.
if test "$use_gtk_awt" = yes; then
@@ -18119,7 +18037,6 @@ s,@USING_GCC_TRUE@,$USING_GCC_TRUE,;t t
s,@USING_GCC_FALSE@,$USING_GCC_FALSE,;t t
s,@LIBICONV@,$LIBICONV,;t t
s,@LTLIBICONV@,$LTLIBICONV,;t t
-s,@LIBMAGIC@,$LIBMAGIC,;t t
s,@PKG_CONFIG@,$PKG_CONFIG,;t t
s,@GTK_CFLAGS@,$GTK_CFLAGS,;t t
s,@GTK_LIBS@,$GTK_LIBS,;t t
diff --git a/libjava/configure.ac b/libjava/configure.ac
index 1adc82f..773814d 100644
--- a/libjava/configure.ac
+++ b/libjava/configure.ac
@@ -1209,12 +1209,6 @@ else
AC_CHECK_LIB(z, deflate, ZLIBSPEC=-lz, ZLIBSPEC=)
fi
- LIBMAGIC=
- AC_CHECK_LIB(magic, magic_open, [
- AC_DEFINE([HAVE_MAGIC_OPEN], 1, [Define if you have magic_open().])
- LIBMAGIC="-lmagic"])
- AC_SUBST(LIBMAGIC)
-
# Test for Gtk stuff, if asked for.
if test "$use_gtk_awt" = yes; then
PKG_CHECK_MODULES(GTK, gtk+-2.0 >= 2.4)
diff --git a/libjava/gcj/Makefile.in b/libjava/gcj/Makefile.in
index 4b3dabb..617f023 100644
--- a/libjava/gcj/Makefile.in
+++ b/libjava/gcj/Makefile.in
@@ -172,7 +172,6 @@ LIBGCJ_LD_SYMBOLIC_FUNCTIONS = @LIBGCJ_LD_SYMBOLIC_FUNCTIONS@
LIBGCJ_SPEC = @LIBGCJ_SPEC@
LIBICONV = @LIBICONV@
LIBLTDL = @LIBLTDL@
-LIBMAGIC = @LIBMAGIC@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff --git a/libjava/include/Makefile.in b/libjava/include/Makefile.in
index 6d82df3..50e054a 100644
--- a/libjava/include/Makefile.in
+++ b/libjava/include/Makefile.in
@@ -171,7 +171,6 @@ LIBGCJ_LD_SYMBOLIC_FUNCTIONS = @LIBGCJ_LD_SYMBOLIC_FUNCTIONS@
LIBGCJ_SPEC = @LIBGCJ_SPEC@
LIBICONV = @LIBICONV@
LIBLTDL = @LIBLTDL@
-LIBMAGIC = @LIBMAGIC@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@
diff --git a/libjava/include/config.h.in b/libjava/include/config.h.in
index 3b6e891..6a5bc96 100644
--- a/libjava/include/config.h.in
+++ b/libjava/include/config.h.in
@@ -187,9 +187,6 @@
/* Define to 1 if you have the <magic.h> header file. */
#undef HAVE_MAGIC_H
-/* Define if you have magic_open(). */
-#undef HAVE_MAGIC_OPEN
-
/* Define to 1 if you have the `memcpy' function. */
#undef HAVE_MEMCPY
diff --git a/libjava/java/net/natVMURLConnection.cc b/libjava/java/net/natVMURLConnection.cc
index 3429bb6..643f90a 100644
--- a/libjava/java/net/natVMURLConnection.cc
+++ b/libjava/java/net/natVMURLConnection.cc
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006 Free Software Foundation
+/* Copyright (C) 2006, 2007 Free Software Foundation
This file is part of libgcj.
@@ -11,46 +11,71 @@ details. */
#include <java/net/VMURLConnection.h>
#include <gcj/cni.h>
#include <java/lang/UnsupportedOperationException.h>
+#include <stdio.h>
-#if defined (HAVE_MAGIC_H) && defined (HAVE_MAGIC_OPEN)
+#if defined (HAVE_MAGIC_H) && defined (USE_LTDL)
#include <magic.h>
+#include <ltdl.h>
static magic_t cookie;
-#endif /* HAVE_MAGIC_H && HAVE_MAGIC_OPEN */
+static magic_t (*p_magic_open)(int flags);
+static int (*p_magic_load)(magic_t cookie, const char *filename);
+static void (*p_magic_close)(magic_t cookie);
+static const char * (*p_magic_buffer) (magic_t cookie, const void *buffer,
+ size_t length);
+
+#endif /* HAVE_MAGIC_H && defined (USE_LTDL) */
void
java::net::VMURLConnection::init ()
{
-#if defined (HAVE_MAGIC_H) && defined (HAVE_MAGIC_OPEN)
- cookie = magic_open (MAGIC_MIME);
+#if defined (HAVE_MAGIC_H) && defined (USE_LTDL)
+ lt_dlhandle handle = lt_dlopenext ("libmagic.so");
+ if (!handle)
+ return;
+
+ p_magic_open = (typeof (p_magic_open))lt_dlsym(handle, "magic_open");
+ if (p_magic_open == NULL)
+ return;
+ p_magic_buffer = (typeof (p_magic_buffer))lt_dlsym(handle, "magic_buffer");
+ if (p_magic_buffer == NULL)
+ return;
+ p_magic_close = (typeof (p_magic_close))lt_dlsym(handle, "magic_close");
+ if (p_magic_close == NULL)
+ return;
+ p_magic_load = (typeof (p_magic_load))lt_dlsym(handle, "magic_load");
+ if (p_magic_load == NULL)
+ return;
+
+ cookie = p_magic_open (MAGIC_MIME);
if (cookie == (magic_t) NULL)
return;
- if (magic_load (cookie, NULL) == -1)
+ if (p_magic_load (cookie, NULL) == -1)
{
- magic_close (cookie);
+ p_magic_close (cookie);
cookie = (magic_t) NULL;
}
-#endif /* HAVE_MAGIC_H && HAVE_MAGIC_OPEN */
+#endif /* HAVE_MAGIC_H && defined (USE_LTDL) */
}
::java::lang::String *
java::net::VMURLConnection::guessContentTypeFromBuffer (jbyteArray bytes,
jint valid)
{
-#if defined (HAVE_MAGIC_H) && defined (HAVE_MAGIC_OPEN)
+#if defined (HAVE_MAGIC_H) && defined (USE_LTDL)
const char *result;
if (cookie == (magic_t) NULL)
return NULL;
- result = magic_buffer (cookie, elements(bytes), valid);
+ result = p_magic_buffer (cookie, elements(bytes), valid);
if (result == NULL)
return NULL;
return _Jv_NewStringUTF (result);
#else
return NULL;
-#endif /* HAVE_MAGIC_H && HAVE_MAGIC_OPEN */
+#endif /* HAVE_MAGIC_H && defined (USE_LTDL) */
}
diff --git a/libjava/testsuite/Makefile.in b/libjava/testsuite/Makefile.in
index 4a34edb..79a0476 100644
--- a/libjava/testsuite/Makefile.in
+++ b/libjava/testsuite/Makefile.in
@@ -160,7 +160,6 @@ LIBGCJ_LD_SYMBOLIC_FUNCTIONS = @LIBGCJ_LD_SYMBOLIC_FUNCTIONS@
LIBGCJ_SPEC = @LIBGCJ_SPEC@
LIBICONV = @LIBICONV@
LIBLTDL = @LIBLTDL@
-LIBMAGIC = @LIBMAGIC@
LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
LIBTOOL = @LIBTOOL@