WW/~LIBXML2-2_6_13.bckLIBXML2-2_6_13.bck8BACK [.LIBXML2-2_6_13...] LIBXML2-2_6_13.bck/SAV/GROUP=0 SYSTEM M~V7.3 _BISOU:: _$1$DKA200: AXP73R0022 ~20)*[TOOLS.LIBSRC.libxml2-2_6_13]acconfig.h;1+,=.#/ 4#I-wE0123KPWO$56?7܅Q~89]^_`GHJ#undef PACKAGE #undef VERSION #undef HAVE_LIBZ #undef HAVE_LIBM #undef HAVE_ISINF #undef HAVE_ISNAN #undef HAVE_LIBHISTORY #undef HAVE_LIBREADLINE #undef SOCKLEN_T #undef HAVE_LIBPTHREAD #undef HAVE_PTHREAD_H /* Define if IPV6 support is there */ #undef SUPPORT_IP6 /* Define if getaddrinfo is there */ #undef HAVE_GETADDRINFO @+*[TOOLS.LIBSRC.libxml2-2_6_13]acinclude.m4;1+,"(.#/ 4#-wE0123KPWO$56?7u!Q~89]^_`GHJdnl Like AC_TRY_EVAL but also errors out if the compiler generates dnl _any_ output. Some compilers might issue warnings which we want dnl to catch. AC_DEFUN([AC_TRY_EVAL2], [{ (eval echo configure:__oline__: \"[$]$1\") 1>&AC_FD_CC; dnl (eval [$]$1) 2>&AC_FD_CC; _out=`eval [$]$1 2>&1` && test "x$_out" = x; }]) dnl Like AC_TRY_COMPILE but calls AC_TRY_EVAL2 instead of AC_TRY_EVAL AC_DEFUN([AC_TRY_COMPILE2], [cat > conftest.$ac_ext <&AC_FD_CC cat conftest.$ac_ext >&AC_FD_CC ifelse([$4], , , [ rm -rf conftest* $4 ])dnl fi rm -f conftest*]) 0)*[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1+,$k./ 4-wE0123KPWO56r7v4"Q~89]^_`GHJr# generated automatically by aclocal 1.8.2 -*- Autoconf -*- # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # serial 47 AC_PROG_LIBTOOL # AC_PROVIDE_IFELSE(MACRO-NAME, IF-PROVIDED, IF-NOT-PROVIDED) # ----------------------------------------------------------- # If this macro is not defined by Autoconf, define it here. m4_ifdef([AC_PROVIDE_IFELSE], [], [m4_define([AC_PROVIDE_IFELSE], [m4_ifdef([AC_PROVIDE_$1], [$2], [$3])])]) # AC_PROG_LIBTOOL # --------------- AC_DEFUN([AC_PROG_LIBTOOL], [AC_REQUIRE([_AC_PROG_LIBTOOL])dnl dnl If AC_PROG_CXX has already been expanded, run AC_LIBTOOL_CXX dnl immediately, otherwise, hook it in at the end of AC_PROG_CXX. AC_PROVIDE_IFELSE([AC_PROG_CXX], [AC_LIBTOOL_CXX], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[AC_LIBTOOL_CXX ])]) dnl And a similar setup for Fortran 77 support AC_PROVIDE_IFELSE([AC_PROG_F77], [AC_LIBTOOL_F77], [define([AC_PROG_F77], defn([AC_PROG_F77])[AC_LIBTOOL_F77 ])]) dnl Quote A][M_PROG_GCJ so that aclocal doesn't bring it in needlessly. dnl If either AC_PROG_GCJ or A][M_PROG_GCJ have already been expanded, run dnl AC_LIBTOOL_GCJ immediately, otherwise, hook it in at the end of both. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [AC_LIBTOOL_GCJ], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ], [AC_LIBTOOL_GCJ], [ifdef([AC_PROG_GCJ], [define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([A][M_PROG_GCJ], [define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[AC_LIBTOOL_GCJ])]) ifdef([LT_AC_PROG_GCJ], [define([LT_AC_PROG_GCJ], defn([LT_AC_PROG_GCJ])[AC_LIBTOOL_GCJ])])])]) ])])# AC_PROG_LIBTOOL # _AC_PROG_LIBTOOL # ---------------- AC_DEFUN([_AC_PROG_LIBTOOL], [AC_REQUIRE([AC_LIBTOOL_SETUP])dnl AC_BEFORE([$0],[AC_LIBTOOL_CXX])dnl AC_BEFORE([$0],[AC_LIBTOOL_F77])dnl AC_BEFORE([$0],[AC_LIBTOOL_GCJ])dnl # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ac_aux_dir/ltmain.sh" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl # Prevent multiple expansion define([AC_PROG_LIBTOOL], []) ])# _AC_PROG_LIBTOOL # AC_LIBTOOL_SETUP # ---------------- AC_DEFUN([AC_LIBTOOL_SETUP], [AC_PREREQ(2.50)dnl AC_REQUIRE([AC_ENABLE_SHARED])dnl AC_REQUIRE([AC_ENABLE_STATIC])dnl AC_REQUIRE([AC_ENABLE_FAST_INSTALL])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_LD])dnl AC_REQUIRE([AC_PROG_LD_RELOAD_FLAG])dnl AC_REQUIRE([AC_PROG_NM])dnl AC_REQUIRE([AC_PROG_LN_S])dnl AC_REQUIRE([AC_DEPLIBS_CHECK_METHOD])dnl # Autoconf 2.13's AC_OBJEXT and AC_EXEEXT macros only works for C compilers! AC_REQUIRE([AC_OBJEXT])dnl AC_REQUIRE([AC_EXEEXT])dnl dnl AC_LIBTOOL_SYS_MAX_CMD_LEN AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE AC_LIBTOOL_OBJDIR AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_PROG_ECHO_BACKSLASH case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed='sed -e s/^X//' [sed_quote_subst='s/\([\\"\\`$\\\\]\)/\\\1/g'] # Same as above, but do not quote variable references. [double_quote_subst='s/\([\\"\\`\\\\]\)/\\\1/g'] # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' # Constants: rm="rm -f" # Global variables: default_ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except M$VC, # which needs '.lib'). libext=a ltmain="$ac_aux_dir/ltmain.sh" ofile="$default_ofile" with_gnu_ld="$lt_cv_prog_gnu_ld" AC_CHECK_TOOL(AR, ar, false) AC_CHECK_TOOL(RANLIB, ranlib, :) AC_CHECK_TOOL(STRIP, strip, :) old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$AR" && AR=ar test -z "$AR_FLAGS" && AR_FLAGS=cru test -z "$AS" && AS=as test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$LD" && LD=ld test -z "$LN_S" && LN_S="ln -s" test -z "$MAGIC_CMD" && MAGIC_CMD=file test -z "$NM" && NM=nm test -z "$SED" && SED=sed test -z "$OBJDUMP" && OBJDUMP=objdump test -z "$RANLIB" && RANLIB=: test -z "$STRIP" && STRIP=: test -z "$ac_objext" && ac_objext=o # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs$old_deplibs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="\$RANLIB -t \$oldlib~$old_postinstall_cmds" ;; *) old_postinstall_cmds="\$RANLIB \$oldlib~$old_postinstall_cmds" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$oldlib" fi # Only perform the check for file, if the check method requires it case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then AC_PATH_MAGIC fi ;; esac AC_PROVIDE_IFELSE([AC_LIBTOOL_DLOPEN], enable_dlopen=yes, enable_dlopen=no) AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], enable_win32_dll=yes, enable_win32_dll=no) AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes AC_ARG_WITH([pic], [AC_HELP_STRING([--with-pic], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [pic_mode="$withval"], [pic_mode=default]) test -z "$pic_mode" && pic_mode=default # Use C for the default configuration in the libtool script tagname= AC_LIBTOOL_LANG_C_CONFIG _LT_AC_TAGCONFIG ])# AC_LIBTOOL_SETUP # _LT_AC_SYS_COMPILER # ------------------- AC_DEFUN([_LT_AC_SYS_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_AC_SYS_COMPILER # _LT_AC_SYS_LIBPATH_AIX # ---------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX], [AC_LINK_IFELSE(AC_LANG_PROGRAM,[ aix_libpath=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'` # Check for a 64-bit object if we didn't find anything. if test -z "$aix_libpath"; then aix_libpath=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; } }'`; fi],[]) if test -z "$aix_libpath"; then aix_libpath="/usr/lib:/lib"; fi ])# _LT_AC_SYS_LIBPATH_AIX # _LT_AC_SHELL_INIT(ARG) # ---------------------- AC_DEFUN([_LT_AC_SHELL_INIT], [ifdef([AC_DIVERSION_NOTICE], [AC_DIVERT_PUSH(AC_DIVERSION_NOTICE)], [AC_DIVERT_PUSH(NOTICE)]) $1 AC_DIVERT_POP ])# _LT_AC_SHELL_INIT # _LT_AC_PROG_ECHO_BACKSLASH # -------------------------- # Add some code to the start of the generated configure script which # will find an echo command which doesn't interpret backslashes. AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH], [_LT_AC_SHELL_INIT([ # Check that we are running under the correct shell. SHELL=${CONFIG_SHELL-/bin/sh} case X$ECHO in X*--fallback-echo) # Remove one level of quotation (which was required for Make). ECHO=`echo "$ECHO" | sed 's,\\\\\[$]\\[$]0,'[$]0','` ;; esac echo=${ECHO-echo} if test "X[$]1" = X--no-reexec; then # Discard the --no-reexec flag, and continue. shift elif test "X[$]1" = X--fallback-echo; then # Avoid inline document here, it may be left over : elif test "X`($echo '\t') 2>/dev/null`" = 'X\t' ; then # Yippee, $echo works! : else # Restart under the correct shell. exec $SHELL "[$]0" --no-reexec ${1+"[$]@"} fi if test "X[$]1" = X--fallback-echo; then # used as fallback echo shift cat </dev/null && echo_test_string="`eval $cmd`" && (test "X$echo_test_string" = "X$echo_test_string") 2>/dev/null then break fi done fi if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then : else # The Solaris, AIX, and Digital Unix default echo programs unquote # backslashes. This makes it impossible to quote backslashes using # echo "$something" | sed 's/\\/\\\\/g' # # So, first we look for a working echo in the user's PATH. lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for dir in $PATH /usr/ucb; do IFS="$lt_save_ifs" if (test -f $dir/echo || test -f $dir/echo$ac_exeext) && test "X`($dir/echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($dir/echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$dir/echo" break fi done IFS="$lt_save_ifs" if test "X$echo" = Xecho; then # We didn't find a better echo, so look for alternatives. if test "X`(print -r '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`(print -r "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # This shell has a builtin print -r that does the trick. echo='print -r' elif (test -f /bin/ksh || test -f /bin/ksh$ac_exeext) && test "X$CONFIG_SHELL" != X/bin/ksh; then # If we have ksh, try running configure again with it. ORIGINAL_CONFIG_SHELL=${CONFIG_SHELL-/bin/sh} export ORIGINAL_CONFIG_SHELL CONFIG_SHELL=/bin/ksh export CONFIG_SHELL exec $CONFIG_SHELL "[$]0" --no-reexec ${1+"[$]@"} else # Try using printf. echo='printf %s\n' if test "X`($echo '\t') 2>/dev/null`" = 'X\t' && echo_testing_string=`($echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then # Cool, printf works : elif echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($ORIGINAL_CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then CONFIG_SHELL=$ORIGINAL_CONFIG_SHELL export CONFIG_SHELL SHELL="$CONFIG_SHELL" export SHELL echo="$CONFIG_SHELL [$]0 --fallback-echo" elif echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo '\t') 2>/dev/null` && test "X$echo_testing_string" = 'X\t' && echo_testing_string=`($CONFIG_SHELL "[$]0" --fallback-echo "$echo_test_string") 2>/dev/null` && test "X$echo_testing_string" = "X$echo_test_string"; then echo="$CONFIG_SHELL [$]0 --fallback-echo" else # maybe with a smaller string... prev=: for cmd in 'echo test' 'sed 2q "[$]0"' 'sed 10q "[$]0"' 'sed 20q "[$]0"' 'sed 50q "[$]0"'; do if (test "X$echo_test_string" = "X`eval $cmd`") 2>/dev/null then break fi prev="$cmd" done if test "$prev" != 'sed 50q "[$]0"'; then echo_test_string=`eval $prev` export echo_test_string exec ${ORIGINAL_CONFIG_SHELL-${CONFIG_SHELL-/bin/sh}} "[$]0" ${1+"[$]@"} else # Oops. We lost completely, so just stick with echo. echo=echo fi fi fi fi fi fi # Copy echo and quote the copy suitably for passing to libtool from # the Makefile, instead of quoting the original, which is used later. ECHO=$echo if test "X$ECHO" = "X$CONFIG_SHELL [$]0 --fallback-echo"; then ECHO="$CONFIG_SHELL \\\$\[$]0 --fallback-echo" fi AC_SUBST(ECHO) ])])# _LT_AC_PROG_ECHO_BACKSLASH # _LT_AC_LOCK # ----------- AC_DEFUN([_LT_AC_LOCK], [AC_ARG_ENABLE([libtool-lock], [AC_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*|s390*-*linux*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case "`/usr/bin/file conftest.o`" in *32-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_TRY_LINK([],[],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; AC_PROVIDE_IFELSE([AC_LIBTOOL_WIN32_DLL], [*-*-cygwin* | *-*-mingw* | *-*-pw32*) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; ]) esac need_locks="$enable_libtool_lock" ])# _LT_AC_LOCK # AC_LIBTOOL_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no ifelse([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) printf "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s conftest.err; then $2=yes fi fi $rm conftest* ]) if test x"[$]$2" = xyes; then ifelse([$5], , :, [$5]) else ifelse([$6], , :, [$6]) fi ])# AC_LIBTOOL_COMPILER_OPTION # AC_LIBTOOL_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ------------------------------------------------------------ # Check whether the given compiler option works AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], [AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" printf "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD else $2=yes fi fi $rm conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then ifelse([$4], , :, [$4]) else ifelse([$5], , :, [$5]) fi ])# AC_LIBTOOL_LINKER_OPTION # AC_LIBTOOL_SYS_MAX_CMD_LEN # -------------------------- AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], [# find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 testring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; *) # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while (test "X"`$CONFIG_SHELL [$]0 --fallback-echo "X$testring" 2>/dev/null` \ = "XX$testring") >/dev/null 2>&1 && new_result=`expr "X$testring" : ".*" 2>&1` && lt_cv_sys_max_cmd_len=$new_result && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` testring=$testring$testring done testring= # Add a significant safety factor because C++ compilers can tack on massive # amounts of additional arguments before passing them to the linker. # It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi ])# AC_LIBTOOL_SYS_MAX_CMD_LEN # _LT_AC_CHECK_DLFCN # -------------------- AC_DEFUN([_LT_AC_CHECK_DLFCN], [AC_CHECK_HEADERS(dlfcn.h)dnl ])# _LT_AC_CHECK_DLFCN # _LT_AC_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ------------------------------------------------------------------ AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext < #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif #ifdef __cplusplus extern "C" void exit (int); #endif void fnord() { int i=42;} int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; /* dlclose (self); */ } exit (status); }] EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_unknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_AC_TRY_DLOPEN_SELF # AC_LIBTOOL_DLOPEN_SELF # ------------------- AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], [AC_REQUIRE([_LT_AC_CHECK_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-dld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-dld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then LDFLAGS="$LDFLAGS $link_static_flag" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_AC_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi ])# AC_LIBTOOL_DLOPEN_SELF # AC_LIBTOOL_PROG_CC_C_O([TAGNAME]) # --------------------------------- # Check to see if options -c and -o are simultaneously supported by compiler AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $rm -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out printf "$lt_simple_compile_test_code" > conftest.$ac_ext # According to Tom Tromey, Ian Lance Taylor reported there are C compilers # that will create temporary files in the current directory regardless of # the output directory. Thus, making CWD read-only will cause this test # to fail, enabling locking or at least warning the user not to do parallel # builds. chmod -w . lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}? :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:__oline__: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:__oline__: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings if test ! -s out/conftest.err; then _LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . $rm conftest* out/* rmdir out cd .. rmdir conftest $rm conftest* ]) ])# AC_LIBTOOL_PROG_CC_C_O # AC_LIBTOOL_SYS_HARD_LINK_LOCKS([TAGNAME]) # ----------------------------------------- # Check to see if we can do hard links to lock some files if needed AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_REQUIRE([_LT_AC_LOCK])dnl hard_links="nottested" if test "$_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $rm conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi ])# AC_LIBTOOL_SYS_HARD_LINK_LOCKS # AC_LIBTOOL_OBJDIR # ----------------- AC_DEFUN([AC_LIBTOOL_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_o|~S~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1|:bjdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir ])# AC_LIBTOOL_OBJDIR # AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH([TAGNAME]) # ---------------------------------------------- # Check hardcoding attributes. AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_AC_TAGVAR(hardcode_action, $1)= if test -n "$_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)" || \ test -n "$_LT_AC_TAGVAR(runpath_var $1)" || \ test "X$_LT_AC_TAGVAR(hardcode_automatic, $1)"="Xyes" ; then # We can hardcode non-existant directories. if test "$_LT_AC_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_AC_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_AC_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_AC_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_AC_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_AC_TAGVAR(hardcode_action, $1)]) if test "$_LT_AC_TAGVAR(hardcode_action, $1)" = relink; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi ])# AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH # AC_LIBTOOL_SYS_LIB_STRIP # ------------------------ AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP], [striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | grep "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi ])# AC_LIBTOOL_SYS_LIB_STRIP # AC_LIBTOOL_SYS_DYNAMIC_LINKER # ----------------------------- # PORTME Fill in your ld.so characteristics AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_MSG_CHECKING([dynamic linker characteristics]) library_names_spec= libname_spec='lib$name' soname_spec= shrext=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" if test "$GCC" = yes; then sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | grep ';' >/dev/null ; then # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix4* | aix5*) version_type=linux need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | grep yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`$echo "X$lib" | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $rm /sys/libs/${libname}_ixlibrary.a; $show "(cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a)"; (cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a) || exit 1; done' ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi4*) version_type=linux need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32*) version_type=windows shrext=".dll" need_version=no need_lib_prefix=no case $GCC,$host_os in yes,cygwin* | yes,mingw* | yes,pw32*) library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i;echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $rm \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="/lib /lib/w32api /usr/lib /usr/local/lib" ;; mingw*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec=`$CC -print-search-dirs | grep "^libraries:" | $SED -e "s/^libraries://" -e "s,=/,/,g"` if echo "$sys_lib_search_path_spec" | [grep ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH printed by # mingw gcc, but we are running on Cygwin. Gcc prints its search # path with ; separators, and with drive letters. We can handle the # drive letters (cygwin fileutils understands them), so leave them, # especially as we might pass files found there to a mingw objdump, # which wouldn't understand a cygwinified path. Ahh. sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`echo "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac ;; *) library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' ;; esac dynamic_linker='Win32 ld.exe' # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. library_names_spec='${libname}${release}${versuffix}$shared_ext ${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext='$(test .$module = .yes && echo .so || echo .dylib)' # Apple's gcc prints 'gcc -print-search-dirs' doesn't operate the same. if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then sys_lib_search_path_spec=`$CC -print-search-dirs | tr "\n" "$PATH_SEPARATOR" | sed -e 's/libraries:/@libraries:/' | tr "@" "\n" | grep "^libraries:" | sed -e "s/^libraries://" -e "s,=/,/,g" -e "s,$PATH_SEPARATOR, ,g" -e "s,.*,& /lib /usr/lib /usr/local/lib,g"` fi sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd1*) dynamic_linker=no ;; freebsd*) objformat=`test -x /usr/bin/objformat && /usr/bin/objformat || echo aout` version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; *) # from 3.2 on shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case "$host_cpu" in ia64*) shrext='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555. postinstall_cmds='chmod 555 $lib' ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be Linux ELF. linux*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' # Find out which ABI we are using (multilib Linux x86_64 hack). libsuff= case "$host_cpu" in x86_64*|s390x*|powerpc64*) echo '[#]line __oline__ "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *64-bit*) libsuff=64 ;; esac fi rm -rf conftest* ;; *) ;; esac sys_lib_dlsearch_path_spec="/lib${libsuff} /usr/lib${libsuff}" sys_lib_search_path_spec="/lib${libsuff} /usr/lib${libsuff} /usr/local/lib${libsuff}" ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; nto-qnx) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; openbsd*) version_type=sunos need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; sco3.2v5*) version_type=osf soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH ;; solaris*) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no export_dynamic_flag_spec='${wl}-Blargedynsym' runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; uts4*) version_type=linux library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no ])# AC_LIBTOOL_SYS_DYNAMIC_LINKER # _LT_AC_TAGCONFIG # ---------------- AC_DEFUN([_LT_AC_TAGCONFIG], [AC_ARG_WITH([tags], [AC_HELP_STRING([--with-tags@<:@=TAGS@:>@], [include additional configurations @<:@automatic@:>@])], [tagnames="$withval"]) if test -f "$ltmain" && test -n "$tagnames"; then if test ! -f "${ofile}"; then AC_MSG_WARN([output file `$ofile' does not exist]) fi if test -z "$LTCC"; then eval "`$SHELL ${ofile} --config | grep '^LTCC='`" if test -z "$LTCC"; then AC_MSG_WARN([output file `$ofile' does not look like a libtool script]) else AC_MSG_WARN([using `LTCC=$LTCC', extracted from `$ofile']) fi fi # Extract list of available tagged configurations in $ofile. # Note that this assumes the entire list is on one line. available_tags=`grep "^available_tags=" "${ofile}" | $SED -e 's/available_tags=\(.*$\)/\1/' -e 's/\"//g'` lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for tagname in $tagnames; do IFS="$lt_save_ifs" # Check whether tagname contains only valid characters case `$echo "X$tagname" | $Xsed -e 's:[[-_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890,/]]::g'` in "") ;; *) AC_MSG_ERROR([invalid tag name: $tagname]) ;; esac if grep "^# ### BEGIN LIBTOOL TAG CONFIG: $tagname$" < "${ofile}" > /dev/null then AC_MSG_ERROR([tag name \"$tagname\" already exists]) fi # Update the list of available tags. if test -n "$tagname"; then echo appending configuration tag \"$tagname\" to $ofile case $tagname in CXX) if test -n "$CXX" && test "X$CXX" != "Xno"; then AC_LIBTOOL_LANG_CXX_CONFIG else tagname="" fi ;; F77) if test -n "$F77" && test "X$F77" != "Xno"; then AC_LIBTOOL_LANG_F77_CONFIG else tagname="" fi ;; GCJ) if test -n "$GCJ" && test "X$GCJ" != "Xno"; then AC_LIBTOOL_LANG_GCJ_CONFIG else tagname="" fi ;; RC) AC_LIBTOOL_LANG_RC_CONFIG ;; *) AC_MSG_ERROR([Unsupported tag name: $tagname]) ;; esac # Append the new tag name to the list of available tags. if test -n "$tagname" ; then available_tags="$available_tags $tagname" fi fi done IFS="$lt_save_ifs" # Now substitute the updated list of available tags. if eval "sed -e 's/^available_tags=.*\$/available_tags=\"$available_tags\"/' \"$ofile\" > \"${ofile}T\""; then mv "${ofile}T" "$ofile" chmod +x "$ofile" else rm -f "${ofile}T" AC_MSG_ERROR([unable to update list of available tagged configurations.]) fi fi ])# _LT_AC_TAGCONFIG # AC_LIBTOOL_DLOPEN # ----------------- # enable checks for dlopen support AC_DEFUN([AC_LIBTOOL_DLOPEN], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_DLOPEN # AC_LIBTOOL_WIN32_DLL # -------------------- # declare package support for building win32 dll's AC_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_BEFORE([$0], [AC_LIBTOOL_SETUP]) ])# AC_LIBTOOL_WIN32_DLL # AC_ENABLE_SHARED([DEFAULT]) # --------------------------- # implement the --enable-shared flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_SHARED], [define([AC_ENABLE_SHARED_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([shared], [AC_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]AC_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]AC_ENABLE_SHARED_DEFAULT) ])# AC_ENABLE_SHARED # AC_DISABLE_SHARED # ----------------- #- set the default shared flag to --disable-shared AC_DEFUN([AC_DISABLE_SHARED], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_SHARED(no) ])# AC_DISABLE_SHARED # AC_ENABLE_STATIC([DEFAULT]) # --------------------------- # implement the --enable-static flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_STATIC], [define([AC_ENABLE_STATIC_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([static], [AC_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]AC_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]AC_ENABLE_STATIC_DEFAULT) ])# AC_ENABLE_STATIC # AC_DISABLE_STATIC # ----------------- # set the default static flag to --disable-static AC_DEFUN([AC_DISABLE_STATIC], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_STATIC(no) ])# AC_DISABLE_STATIC # AC_ENABLE_FAST_INSTALL([DEFAULT]) # --------------------------------- # implement the --enable-fast-install flag # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. AC_DEFUN([AC_ENABLE_FAST_INSTALL], [define([AC_ENABLE_FAST_INSTALL_DEFAULT], ifelse($1, no, no, yes))dnl AC_ARG_ENABLE([fast-install], [AC_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]AC_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]AC_ENABLE_FAST_INSTALL_DEFAULT) ])# AC_ENABLE_FAST_INSTALL # AC_DISABLE_FAST_INSTALL # ----------------------- # set the default to --disable-fast-install AC_DEFUN([AC_DISABLE_FAST_INSTALL], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_ENABLE_FAST_INSTALL(no) ])# AC_DISABLE_FAST_INSTALL # AC_LIBTOOL_PICMODE([MODE]) # -------------------------- # implement the --with-pic flag # MODE is either `yes' or `no'. If omitted, it defaults to `both'. AC_DEFUN([AC_LIBTOOL_PICMODE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl pic_mode=ifelse($#,1,$1,default) ])# AC_LIBTOOL_PICMODE # AC_PROG_EGREP # ------------- # This is predefined starting with Autoconf 2.54, so this conditional # definition can be removed once we require Autoconf 2.54 or later. m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP], [AC_CACHE_CHECK([for egrep], [ac_cv_prog_egrep], [if echo a | (grep -E '(a|b)') >/dev/null 2>&1 then ac_cv_prog_egrep='grep -E' else ac_cv_prog_egrep='egrep' fi]) EGREP=$ac_cv_prog_egrep AC_SUBST([EGREP]) ])]) # AC_PATH_TOOL_PREFIX # ------------------- # find a file program which can recognise shared library AC_DEFUN([AC_PATH_TOOL_PREFIX], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="ifelse([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex="`expr \"$deplibs_check_method\" : \"file_magic \(.*\)\"`" MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi ])# AC_PATH_TOOL_PREFIX # AC_PATH_MAGIC # ------------- # find a file program which can recognise a shared library AC_DEFUN([AC_PATH_MAGIC], [AC_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then AC_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# AC_PATH_MAGIC # AC_PROG_LD # ---------- # find the path to the GNU or non-GNU linker AC_DEFUN([AC_PROG_LD], [AC_ARG_WITH([gnu-ld], [AC_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no]_~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1WY|x) AC_REQUIRE([LT_AC_PROG_SED])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the path of ld ac_prog=`echo $ac_prog| $SED 's%\\\\%/%g'` while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do ac_prog=`echo $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some GNU ld's only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case "$host_cpu" in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - PA-RISC [0-9].[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]].[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; irix5* | irix6* | nonstopux*) case $host_os in irix5* | nonstopux*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF 32-bit MSB dynamic lib MIPS - version 1" ;; *) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method="file_magic ELF ${libmagic} MSB mips-[[1234]] dynamic lib MIPS - version 1" ;; esac lt_cv_file_magic_test_file=`echo /lib${libsuff}/libc.so*` lt_cv_deplibs_check_method=pass_all ;; # This must be Linux ELF. linux*) case $host_cpu in alpha* | hppa* | i*86 | ia64* | m68* | mips | mipsel | powerpc* | sparc* | s390* | sh* | x86_64*) lt_cv_deplibs_check_method=pass_all ;; *) # glibc up to 2.1.1 does not perform some relocations on ARM lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; esac lt_cv_file_magic_test_file=`echo /lib/libc.so* /lib/libc-*.so` ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; nto-qnx) lt_cv_deplibs_check_method=unknown ;; openbsd*) lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB shared object' else lt_cv_deplibs_check_method='file_magic OpenBSD.* shared library' fi ;; osf3* | osf4* | osf5*) # this will be overridden with pass_all, but let us keep it just in case lt_cv_deplibs_check_method='file_magic COFF format alpha shared library' lt_cv_file_magic_test_file=/shlib/libc.so lt_cv_deplibs_check_method=pass_all ;; sco3.2v5*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all lt_cv_file_magic_test_file=/lib/libc.so ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown ])# AC_DEPLIBS_CHECK_METHOD # AC_PROG_NM # ---------- # find the path to a BSD-compatible name lister AC_DEFUN([AC_PROG_NM], [AC_CACHE_CHECK([for BSD-compatible nm], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/${ac_tool_prefix}nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac esac fi done IFS="$lt_save_ifs" test -z "$lt_cv_path_NM" && lt_cv_path_NM=nm fi]) NM="$lt_cv_path_NM" ])# AC_PROG_NM # AC_CHECK_LIBM # ------------- # check for math library AC_DEFUN([AC_CHECK_LIBM], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cygwin* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac ])# AC_CHECK_LIBM # AC_LIBLTDL_CONVENIENCE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl convenience library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-convenience to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided, it is assumed to be `libltdl'. LIBLTDL will # be prefixed with '${top_builddir}/' and LTDLINCL will be prefixed with # '${top_srcdir}/' (note the single quotes!). If your package is not # flat and you're not using automake, define top_builddir and # top_srcdir appropriately in the Makefiles. AC_DEFUN([AC_LIBLTDL_CONVENIENCE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl case $enable_ltdl_convenience in no) AC_MSG_ERROR([this package needs a convenience libltdl]) ;; "") enable_ltdl_convenience=yes ac_configure_args="$ac_configure_args --enable-ltdl-convenience" ;; esac LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdlc.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_CONVENIENCE # AC_LIBLTDL_INSTALLABLE([DIRECTORY]) # ----------------------------------- # sets LIBLTDL to the link flags for the libltdl installable library and # LTDLINCL to the include flags for the libltdl header and adds # --enable-ltdl-install to the configure arguments. Note that LIBLTDL # and LTDLINCL are not AC_SUBSTed, nor is AC_CONFIG_SUBDIRS called. If # DIRECTORY is not provided and an installed libltdl is not found, it is # assumed to be `libltdl'. LIBLTDL will be prefixed with '${top_builddir}/' # and LTDLINCL will be prefixed with '${top_srcdir}/' (note the single # quotes!). If your package is not flat and you're not using automake, # define top_builddir and top_srcdir appropriately in the Makefiles. # In the future, this macro may have to be called after AC_PROG_LIBTOOL. AC_DEFUN([AC_LIBLTDL_INSTALLABLE], [AC_BEFORE([$0],[AC_LIBTOOL_SETUP])dnl AC_CHECK_LIB(ltdl, lt_dlinit, [test x"$enable_ltdl_install" != xyes && enable_ltdl_install=no], [if test x"$enable_ltdl_install" = xno; then AC_MSG_WARN([libltdl not installed, but installation disabled]) else enable_ltdl_install=yes fi ]) if test x"$enable_ltdl_install" = x"yes"; then ac_configure_args="$ac_configure_args --enable-ltdl-install" LIBLTDL='${top_builddir}/'ifelse($#,1,[$1],['libltdl'])/libltdl.la LTDLINCL='-I${top_srcdir}/'ifelse($#,1,[$1],['libltdl']) else ac_configure_args="$ac_configure_args --enable-ltdl-install=no" LIBLTDL="-lltdl" LTDLINCL= fi # For backwards non-gettext consistent compatibility... INCLTDL="$LTDLINCL" ])# AC_LIBLTDL_INSTALLABLE # AC_LIBTOOL_CXX # -------------- # enable support for C++ libraries AC_DEFUN([AC_LIBTOOL_CXX], [AC_REQUIRE([_LT_AC_LANG_CXX]) ])# AC_LIBTOOL_CXX # _LT_AC_LANG_CXX # --------------- AC_DEFUN([_LT_AC_LANG_CXX], [AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,CXX" | sed 's/^,//'`]) ])# _LT_AC_LANG_CXX # AC_LIBTOOL_F77 # -------------- # enable support for Fortran 77 libraries AC_DEFUN([AC_LIBTOOL_F77], [AC_REQUIRE([_LT_AC_LANG_F77]) ])# AC_LIBTOOL_F77 # _LT_AC_LANG_F77 # --------------- AC_DEFUN([_LT_AC_LANG_F77], [AC_REQUIRE([AC_PROG_F77]) _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,F77" | sed 's/^,//'`]) ])# _LT_AC_LANG_F77 # AC_LIBTOOL_GCJ # -------------- # enable support for GCJ libraries AC_DEFUN([AC_LIBTOOL_GCJ], [AC_REQUIRE([_LT_AC_LANG_GCJ]) ])# AC_LIBTOOL_GCJ # _LT_AC_LANG_GCJ # --------------- AC_DEFUN([_LT_AC_LANG_GCJ], [AC_PROVIDE_IFELSE([AC_PROG_GCJ],[], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ],[], [AC_PROVIDE_IFELSE([LT_AC_PROG_GCJ],[], [ifdef([AC_PROG_GCJ],[AC_REQUIRE([AC_PROG_GCJ])], [ifdef([A][M_PROG_GCJ],[AC_REQUIRE([A][M_PROG_GCJ])], [AC_REQUIRE([A][C_PROG_GCJ_OR_A][M_PROG_GCJ])])])])])]) _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,GCJ" | sed 's/^,//'`]) ])# _LT_AC_LANG_GCJ # AC_LIBTOOL_RC # -------------- # enable support for Windows resource files AC_DEFUN([AC_LIBTOOL_RC], [AC_REQUIRE([LT_AC_PROG_RC]) _LT_AC_SHELL_INIT([tagnames=`echo "$tagnames,RC" | sed 's/^,//'`]) ])# AC_LIBTOOL_RC # AC_LIBTOOL_LANG_C_CONFIG # ------------------------ # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG], [_LT_AC_LANG_C_CONFIG]) AC_DEFUN([_LT_AC_LANG_C_CONFIG], [lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}\n' _LT_AC_SYS_COMPILER # # Check for any special shared library compilation flags. # _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)= if test "$GCC" = no; then case $host_os in sco3.2v5*) _LT_AC_TAGVAR(lt_prog_cc_shlib, $1)='-belf' ;; esac fi if test -n "$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)"; then AC_MSG_WARN([`$CC' requires `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to build shared libraries]) if echo "$old_CC $old_CFLAGS " | grep "[[ ]]$]_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)[[[ ]]" >/dev/null; then : else AC_MSG_WARN([add `$_LT_AC_TAGVAR(lt_prog_cc_shlib, $1)' to the CC or CFLAGS env variable and reconfigure]) _LT_AC_TAGVAR(lt_cv_prog_cc_can_build_shared, $1)=no fi fi # # Check to make sure the static flag actually works. # AC_LIBTOOL_LINKER_OPTION([if $compiler static flag $_LT_AC_TAGVAR(lt_prog_compiler_static, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_static_works, $1), $_LT_AC_TAGVAR(lt_prog_compiler_static, $1), [], [_LT_AC_TAGVAR(lt_prog_compiler_static, $1)=]) AC_LIBTOOL_PROG_COMPILER_NO_RTTI($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_DLOPEN_SELF($1) # Report which librarie types wil actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case "$host_os" in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix4*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. Also zsh mangles # `"' quotes if we put them in here... so don't! output_verbose_link_cmd='echo' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring' _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC="$lt_save_CC" ])# AC_LIBTOOL_LANG_C_CONFIG # AC_LIBTOOL_LANG_CXX_CONFIG # -------------------------- # Ensure that the configuration vars for the C compiler are # suitably defined. Those variables are subsequently used by # AC_LIBTOOL_CONFIG to write the compiler configuration to `libtool'. AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG], [_LT_AC_LANG_CXX_CONFIG(CXX)]) AC_DEFUN([_LT_AC_LANG_CXX_CONFIG], [AC_LANG_PUSH(C++) AC_REQUIRE([AC_PROG_CXX]) AC_REQUIRE([AC_PROG_CXXCPP]) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_AC_TAGVAR(no_undefined_flag, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Dependencies to place before and after the object being linked: _LT_AC_TAGVAR(predep_objects, $1)= _LT_AC_TAGVAR(postdep_objects, $1)= _LT_AC_TAGVAR(predeps, $1)= _LT_AC_TAGVAR(postdeps, $1)= _LT_AC_TAGVAR(compiler_lib_search_path, $1)= # Source file extension for C++ test sources. ac_ext=cc # Object file extension for compiled C++ test sources. objext=o _LT_AC_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;\n" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }\n' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_AC_SYS_COMPILER # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} compiler=$CC _LT_AC_TAGVAR(compiler, $1)=$CC cc_basename=`$echo X"$compiler" | $Xsed -e 's%^.*/%%'` # We don't want -fno-exception wen compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration AC_PROG_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | \ grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_AC_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GXX" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)e®~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1U|='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; esac lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes fi ;; dgux*) case $cc_basename in ec++) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; ghcx) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd[12]*) # C++ shared libraries reported to be fairly broken before switch to ELF _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_AC_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; hpux9*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | egrep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -nostdlib -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; *) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; aCC) case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | grep "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case "$host_cpu" in ia64*|hppa*64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $linker_flags $libobjs $deplibs' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; irix5* | irix6*) case $cc_basename in CC) # SGI C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` -o $lib' fi fi _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; linux*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | grep "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc) # Intel C++ with_gnu_ld=yes _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; cxx) # Compaq C++ _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; osf3*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && echo ${wl}-set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; osf4* | osf5*) case $cc_basename in KCC) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_AC_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; RCC) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; cxx) _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname -Wl,-input -Wl,$lib.exp `test -n "$verstring" && echo -set_version $verstring` -update_registry $objdir/so_locations -o $lib~ $rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "ld" | grep -v "ld:"`; templist=`echo $templist | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep "\-L"' else # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; sco*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case $cc_basename in CC) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; lcc) # Lucid # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -nolib -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -nolib ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The C++ compiler is used as linker so we must use $wl # flag to pass the commands to the underlying system # linker. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep "\-[[LR]]"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; echo $list' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_AC_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | grep -v '^2\.7' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -shared $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$rm $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd="$CC -G $CFLAGS -v conftest.$objext 2>&1 | grep \"\-L\"" fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' fi ;; esac ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_AC_TAGVAR(GCC, $1)="$GXX" _LT_AC_TAGVAR(LD, $1)="$LD" AC_LIBTOOL_POSTDEP_PREDEP($1) AC_LIBTOOL_PROG_COMPILER_PIC($1) AC_LIBTOOL_PROG_CC_C_O($1) AC_LIBTOOL_SYS_HARD_LINK_LOCKS($1) AC_LIBTOOL_PROG_LD_SHLIBS($1) AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH($1) AC_LIBTOOL_SYS_LIB_STRIP AC_LIBTOOL_SYS_DYNAMIC_LINKER($1) AC_LIBTOOL_DLOPEN_SELF($1) AC_LIBTOOL_CONFIG($1) AC_LANG_POP CC=$lt_save_CC LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ldcxx=$with_gnu_ld with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld ])# AC_LIBTOOL_LANG_CXX_CONFIG # AC_LIBTOOL_POSTDEP_PREDEP([TAGNAME]) # ------------------------ # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP],[ dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... ifelse([$1],[],[cat > conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext < conftest.$ac_ext <> "$cfgfile" ifelse([$1], [], [#! $SHELL # `$echo "$cfgfile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $PROGRAM (GNU $PACKAGE $VERSION$TIMESTAMP) # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001 # Free Software Foundation, Inc. # # This file is part of GNU Libtool: # Originally by Gordon Matzigkeit , 1996 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="$SED -e s/^X//" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. if test "X\${CDPATH+set}" = Xset; then CDPATH=:; export CDPATH; fi # The names of the tagged configurations supported by this script. available_tags= # ### BEGIN LIBTOOL CONFIG], [# ### BEGIN LIBTOOL TAG CONFIG: $tagname]) # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$_LT_AC_TAGVAR(archive_cmds_need_lc, $1) # Whether or not to disallow shared libs when runtime libs are static allow_libtool_libs_with_static_runtimes=$_LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1) # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # The host system. host_alias=$host_alias host=$host # An echo program that does not interpret backslashes. echo=$lt_echo # The archiver. AR=$lt_AR AR_FLAGS=$lt_AR_FLAGS # A C compiler. LTCC=$lt_LTCC # A language-specific compiler. CC=$lt_[]_LT_AC_TAGVAR(compiler, $1) # Is the compiler the GNU C compiler? with_gcc=$_LT_AC_TAGVAR(GCC, $1) # An ERE matcher. EGREP=$lt_EGREP # The linker used to build libraries. LD=$lt_[]_LT_AC_TAGVAR(LD, $1) # Whether we need hard or soft links. LN_S=$lt_LN_S # A BSD-compatible nm program. NM=$lt_NM # A symbol stripping program STRIP=$STRIP # Used to examine libraries when file_magic_cmd begins "file" MAGIC_CMD=$MAGIC_CMD # Used on cygwin: DLL creation program. DLLTOOL="$DLLTOOL" # Used on cygwin: object dumper. OBJDUMP="$OBJDUMP" # Used on cygwin: assembler. AS="$AS" # The name of the directory that contains temporary libtool files. objdir=$objdir # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # How to pass a linker flag through the compiler. wl=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) # Object file suffix (normally "o"). objext="$ac_objext" # Old archive suffix (normally "a"). libext="$libext" # Shared library suffix (normally ".so"). shrext='$shrext' # Executable file suffix (normally ""). exeext="$exeext" # Additional compiler flags for building library objects. pic_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) pic_mode=$pic_mode # What is the maximum length of a command? max_cmd_len=$lt_cv_sys_max_cmd_len # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_[]_LT_AC_TAGVAR(lt_cv_prog_compiler_c_o, $1) # Must we lock files when doing compilation ? need_locks=$lt_need_locks # Do we need the lib prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Compiler flag to prevent dynamic linking. link_static_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_static, $1) # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_[]_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_[]_LT_AC_TAGVAR(export_dynamic_flag_spec, $1) # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_[]_LT_AC_TAGVAR(whole_archive_flag_spec, $1) # Compiler flag to generate thread-safe objects. thread_safe_flag_spec=$lt_[]_LT_AC_TAGVAR(thread_safe_flag_spec, $1) # Library versioning type. version_type=$version_type # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME. library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Commands used to build and install an old-style archive. RANLIB=$lt_RANLIB old_archive_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_cmds, $1) old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_new_cmds, $1) # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_[]_LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1) # Commands used to build and install a shared archive. archive_cmds=$lt_[]_LT_AC_TAGVAR(archive_cmds, $1) archive_expsym_cmds=$lt_[]_LT_AC_TAGVAR(archive_expsym_cmds, $1) postinstall_cmds=$lt_postinstall_cmds postuninstall_cmds=$lt_postuninstall_cmds # Commands used to build a loadable module (assumed same as above if empty) module_cmds=$lt_[]_LT_AC_TAGVAR(module_cmds, $1) module_expsym_cmds=$lt_[]_LT_AC_TAGVAR(module_expsym_cmds, $1) # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # Dependencies to place before the objects being linked to create a # shared library. predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1) # Dependencies to place after the objects being linked to create a # shared library. postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1) # Dependencies to place before the objects being linked to create a # shared library. predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1) # Dependencies to place after the objects being linked to create a # shared library. postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1) # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1) # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method == file_magic. file_magic_cmd=$lt_file_magic_cmd # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_[]_LT_AC_TAGVAR(allow_undefined_flag, $1) # Flag that forces no undefined symbols. no_undefined_flag=$lt_[]_LT_AC_TAGVAR(no_undefined_flag, $1) # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # Same as above, but a single script fragment to be evaled but not shown. finish_eval=$lt_finish_eval # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # This is the shared library runtime path variable. runpath_var=$runpath_var # This is the shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # How to hardcode a shared library path into an executable. hardcode_action=$_LT_AC_TAGVAR(hardcode_action, $1) # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist. hardcode_libdir_flag_spec=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) # If ld is used when linking, flag to hardcode \$libdir into # a binary during linking. This must work even if \$libdir does # not exist. hardcode_libdir_flag_spec_ld=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1) # Whether we need a single -rpath flag with a separated argument. hardcode_libdir_separator=$lt_[]_LT_AC_TAGVAR(hardcode_libdir_separator, $1) # Set to yes if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the # resulting binary. hardcode_direct=$_LT_AC_TAGVAR(hardcode_direct, $1) # Set to yes if using the -LDIR flag during linking hardcodes DIR into the # resulting binary. hardcode_minus_L=$_LT_AC_TAGVAR(hardcode_minus_L, $1) # Set to yes if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into # the resulting binary. hardcode_shlibpath_var=$_LT_AC_TAGVAR(hardcode_shlibpath_var, $1) # Set to yes if building a shared library automatically hardcodes DIR into the library # and all subsequent libraries and executables linked against it. hardcode_automatic=$_LT_AC_TAGVAR(hardcode_automatic, $1) # Variables whose values should be saved in libtool wrapper scripts and # restored at relink time. variables_saved_for_relink="$variables_saved_for_relink" # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$_LT_AC_TAGVAR(link_all_deplibs, $1) # Compile-time system search path for libraries sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Fix the shell variable \$srcfile for the compiler. fix_srcfile_path="$_LT_AC_TAGVAR(fix_srcfile_path, $1)" # Set to yes if exported symbols are required. always_export_symbols=$_LT_AC_TAGVAR(always_export_symbols, $1) # The commands to list exported symbols. export_symbols_cmds=$lt_[]_LT_AC_TAGVAR(export_symbols_cmds, $1) # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_[]_LT_AC_TAGVAR(exclude_expsyms, $1) # Symbols that must always be exported. include_expsyms=$lt_[]_LT_AC_TAGVAR(include_expsyms, $1) ifelse([$1],[], [# ### END LIBTOOL CONFIG], [# ### END LIBTOOL TAG CONFIG: $tagname]) __EOF__ ifelse([$1],[], [ case $host_os in aix3*) cat <<\EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi EOF ;; esac # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || \ (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ]) else # If there is no Makefile yet, we rely on a make rule to execute # `config.status --recheck' to rerun these tests and create the # libtool script then. test -f Makefile && make "$ltmain" fi ])# AC_LIBTOOL_CONFIG # AC_LIBTOOL_PROG_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_REQUIRE([_LT_AC_SYS_COMPILER])dnl _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' AC_LIBTOOL_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi ])# AC_LIBTOOL_PROG_COMPILER_NO_RTTI # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # --------------------------------- AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_REQUIRE([AC_CANONICAL_HOST]) AC_REQUIRE([AC_PROG_NM]) AC_REQUIRE([AC_OBJEXT]) # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Transform the above into a raw symbol and a C symbol. symxfrm='\1 \2\3 \3' # Transform an extracted symbol line into a proper C declaration lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^. .* \(.*\)$/extern int \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32*) symcode='[[ABCDGISTW]]' ;; hpux*) # Its linker distinguishes data from code symbols if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\) $/ {\\\"\1\\\", (lt_ptr) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (lt_ptr) \&\2},/p'" ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris* | sysv5*) symcode='[[BDRT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`echo 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Try without a prefix undercore, then with it. for ac_symprfx in "" "_"; do # Write the raw and C identifiers. lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*\($ac_symprfx\)$sympat$opt_cr$/$symxfrm/p'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext < $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if grep ' nm_test_var$' "$nlist" >/dev/null; then if grep ' nm_test_func$' "$nlist" >/dev/null; then cat < conftest.$ac_ext #ifdef __cplusplus extern "C" { #endif EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | grep -v main >> conftest.$ac_ext' cat <> conftest.$ac_ext #if defined (__STDC__) && __STDC__ # define lt_ptr_t void * #else # define lt_ptr_t char * # define const #endif /* The mapping between symbol names and symbols. */ const struct { const char *name; lt_ptr_t address; } lt_preloaded_symbols[[]] = { EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (lt_ptr_t) \&\2},/" < "$nlist" | grep -v main >> conftest.$ac_ext cat <<\EOF >> conftest.$ac_ext {0, (lt_ptr_t) 0} }; #ifdef __cplusplus } #endif EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_save_LIBS="$LIBS" lt_save_CFLAGS="$CFLAGS" LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_AC_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS="$lt_save_LIBS" CFLAGS="$lt_save_CFLAGS" else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -f conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi ]) # AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE # AC_LIBTOOL_PROG_COMPILER_PIC([TAGNAME]) # --------------------------------------- AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC], [_LT_AC_TAGVAR(lt_prog_compiler_wl, $1)= _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)= AC_MSG_CHECKING([for $compiler option to produce PIC]) ifelse([$1],[CXX],[ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | os2* | pw32*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix4* | aix5*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68) # Green Hills C++ Compiler # _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; dgux*) case $cc_basename in ec++) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)="${ac_cv_prog_cc_wl}-a ${ac_cv_prog_cc_wl}archive" case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; irix5* | irix6* | nons#e~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1&|2topux*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux*) case $cc_basename in KCC) # KAI C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; icpc) # Intel C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; cxx) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; osf3* | osf4* | osf5*) case $cc_basename in KCC) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC) # Rational C++ 2.4.1 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx) # Digital/Compaq C++ _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; sco*) case $cc_basename in CC) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; *) ;; esac ;; solaris*) case $cc_basename in CC) # Sun C++ 4.2, 5.x and Centerline C++ _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx) # Green Hills C++ Compiler _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC) # Sun C++ 4.x _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc) # Lucid _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; tandem*) case $cc_basename in NCC) # NonStop-UX NCC 3.20 _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; unixware*) ;; vxworks*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; beos* | cygwin* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | pw32* | os2*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case "$host_cpu" in hppa*64*|ia64*) # +Z the default ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; newsos6) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; linux*) case $CC in icc|ecc) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; ccc) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; esac ;; osf3* | osf4* | osf5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; sco3.2v5*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kpic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-dn' ;; solaris*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sunos4*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_AC_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; uts4*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_AC_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)]) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)"; then AC_LIBTOOL_COMPILER_OPTION([if $compiler PIC flag $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) works], _LT_AC_TAGVAR(lt_prog_compiler_pic_works, $1), [$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= _LT_AC_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi case "$host_os" in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_AC_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_AC_TAGVAR(lt_prog_compiler_pic, $1)ifelse([$1],[],[ -DPIC],[ifelse([$1],[CXX],[ -DPIC],[])])" ;; esac ]) # AC_LIBTOOL_PROG_LD_SHLIBS([TAGNAME]) # ------------------------------------ # See if the linker supports building shared libraries. AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) ifelse([$1],[CXX],[ _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' case $host_os in aix4* | aix5*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_AC_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw*) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' ;; *) _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ],[ runpath_var= _LT_AC_TAGVAR(allow_undefined_flag, $1)= _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_AC_TAGVAR(archive_cmds, $1)= _LT_AC_TAGVAR(archive_expsym_cmds, $1)= _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)= _LT_AC_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)= _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= _LT_AC_TAGVAR(thread_safe_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)= _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(link_all_deplibs, $1)=unknown _LT_AC_TAGVAR(hardcode_automatic, $1)=no _LT_AC_TAGVAR(module_cmds, $1)= _LT_AC_TAGVAR(module_expsym_cmds, $1)= _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_AC_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_AC_TAGVAR(exclude_expsyms, $1)="_GLOBAL_OFFSET_TABLE_" # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; openbsd*) with_gnu_ld=no ;; esac _LT_AC_TAGVAR(ld_shlibs, $1)=yes if test "$with_gnu_ld" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # See if GNU ld supports shared libraries. case $host_os in aix3* | aix4* | aix5*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: the GNU linker, at least up to release 2.9.1, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to modify your PATH *** so that a non-GNU linker is found, and then restart. EOF fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # Samuel A. Falvo II reports # that the semantics of dynamic libraries on AmigaOS, at least up # to version 4, is to share data among multiple programs linked # with the same dynamic library. Since this doesn't match the # behavior of shared libraries on other platforms, we can't use # them. _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; beos*) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_AC_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32*) # _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=no _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGS]] /s/.* \([[^ ]]*\)/\1 DATA/'\'' | $SED -e '\''/^[[AITW]] /s/.* //'\'' | sort | uniq > $export_symbols' if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_AC_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--image-base=0x10000000 ${wl}--out-implib,$lib' else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris* | sysv5*) if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then _LT_AC_TAGVAR(ld_shlibs, $1)=no cat <&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. EOF elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; sunos4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; linux*) if $LD --help 2>&1 | egrep ': supported targets:.* elf' > /dev/null; then tmp_archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_cmds, $1)="$tmp_archive_cmds" supports_anon_versioning=no case `$LD -v 2>/dev/null` in *\ [01].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac if test $supports_anon_versioning = yes; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ $echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)="$tmp_archive_cmds" fi else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; *) if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_AC_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = yes; then runpath_var=LD_RUN_PATH _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | grep 'no-whole-archive' > /dev/null; then _LT_AC_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_AC_TAGVAR(whole_archive_flag_spec, $1)= fi fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(always_export_symbols, $1)=yes _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$link_static_flag"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix4* | aix5*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm if $NM -V 2>&1 | grep 'GNU' > /dev/null; then _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' else _LT_AC_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\[$]2 == "T") || (\[$]2 == "D") || (\[$]2 == "B")) && ([substr](\[$]3,1,1) != ".")) { print \[$]3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix5*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_AC_TAGVAR(archive_cmds, $1)='' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && \ strings "$collect2name" | grep resolve_lib_name >/dev/null then # We have reworked collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=yes else # We have old collect2 _LT_AC_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_AC_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then echo "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_AC_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$no_entry_flag \${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an empty executable. _LT_AC_SYS_LIBPATH_AIX _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_AC_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' # -bexpall does not export symbols beginning with underscore (_) _LT_AC_TAGVAR(always_export_symbols, $1)=yes # Exported symbols can be pulled into shared objects from archives _LT_AC_TAGVAR(whole_archive_flag_spec, $1)=' ' _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds it's shared libraries. _LT_AC_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs $compiler_flags ${wl}-bE:$export_symbols ${wl}-bnoentry${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/a2ixlibrary.data~$echo "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$echo "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$echo "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$echo "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes # see comment about different semantics on the GNU ld section _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; bsdi4*) _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext=".dll" # FIXME: Setting linknames here is a bad hack. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `echo "$deplibs" | $SED -e '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_AC_TAGVAR(old_archive_cmds, $1)='lib /OUT:$oldlib$oldobjs$old_deplibs' fix_srcfile_path='`cygpath -w "$srcfile"`' _LT_AC_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; darwin* | rhapsody*) if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no case "$host_os" in rhapsody* | darwin1.[[012]]) _LT_AC_TAGVAR(allow_undefined_flag, $1)='-undefined suppress' ;; *) # Darwin 1.3 on test -z ${LD_TWOLEVEL_NAMESPACE} && _LT_AC_TAGVAR(allow_undefined_flag, $1)='-flat_namespace -undefined suppress' ;; esac # FIXME: Relying on posixy $() will cause problems for # cross-compilation, but unfortunately the echo tests do not # yet detect zsh echo's removal of \ escapes. Also zsh mangles # `"' quotes if we put them in here... so don't! lt_int_apple_cc_single_mod=no output_verbose_link_cmd='echo' if $CC -dumpspecs 2>&1 | grep 'single_module' >/dev/null ; then lt_int_apple_cc_single_mod=yes fi if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring' fi _LT_AC_TAGVAR(module_cmds, $1)='$CC -bundle ${wl}-bind_at_load $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags' # Don't fix this by using the ld -exported_symbols_list flag, it doesn't exist in older darwin ld's if test "X$lt_int_apple_cc_single_mod" = Xyes ; then _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -dynamiclib -single_module $allow_undefined_flag -o $lib $libobjs $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' else _LT_AC_TAGVAR(archive_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -r ${wl}-bind_at_load -keep_private_externs -nostdlib -o ${lib}-master.o $libobjs~$CC -dynamiclib $allow_undefined_flag -o $lib ${lib}-master.o $deplibs $compiler_flags -install_name $rpath/$soname $verstring~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' fi _LT_AC_TAGVAR(module_expsym_cmds, $1)='sed -e "s,#.*,," -e "s,^[ ]*,," -e "s,^\(..*\),_&," < $export_symbols > $output_objdir/${libname}-symbols.expsym~$CC -bundle $allow_undefined_flag -o $lib $libobjs $deplibs$compiler_flags~nmedit -s $output_objdir/${libname}-symbols.expsym ${lib}' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_automatic, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-all_load $convenience' _LT_AC_TAGVAR(link_all_deplibs, $1)=yes fi ;; dgux*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; freebsd1*) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support.@7tV~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1%|p Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$CC -shared -fPIC ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$rm $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10* | hpux11*) if test "$GCC" = yes -a "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case "$host_cpu" in hppa*64*|ia64*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname -o $lib $libobjs $deplibs $linker_flags' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' ;; esac fi if test "$with_gnu_ld" = no; then case "$host_cpu" in hppa*64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='+b $libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; ia64*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; *) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec_ld, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; openbsd*) _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi ;; os2*) _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_AC_TAGVAR(archive_cmds, $1)='$echo "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$echo "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~$echo DATA >> $output_objdir/$libname.def~$echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~$echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_AC_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_AC_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && echo ${wl}-set_version ${wl}$verstring` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_AC_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_AC_TAGVAR(archive_cmds, $1)='$LD -shared${allow_undefined_flag} $libobjs $deplibs $linker_flags -msym -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${output_objdir}/so_locations -o $lib' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; echo "-hidden">> $lib.exp~ $LD -shared${allow_undefined_flag} -input $lib.exp $linker_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && echo -set_version $verstring` -update_registry ${objdir}/so_locations -o $lib~$rm $lib.exp' # Both c and cxx compiler support -rpath directly _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_AC_TAGVAR(hardcode_libdir_separator, $1)=: ;; sco3.2v5*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ;; solaris*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $CC -shared ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$rm $lib.exp' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_AC_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_AC_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=yes _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_AC_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_AC_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_AC_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4.2uw2*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_direct, $1)=yes _LT_AC_TAGVAR(hardcode_minus_L, $1)=no _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no hardcode_runpath_var=yes runpath_var=LD_RUN_PATH ;; sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[[78]]* | unixware7*) _LT_AC_TAGVAR(no_undefined_flag, $1)='${wl}-z ${wl}text' if test "$GCC" = yes; then _LT_AC_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_AC_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' fi runpath_var='LD_RUN_PATH' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv5*) _LT_AC_TAGVAR(no_undefined_flag, $1)=' -z text' # $CC -shared without GNU ld will not create a library from C++ # object files and a static libstdc++, better avoid it by now _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(archive_expsym_cmds, $1)='$echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~$echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$rm $lib.exp' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' ;; uts4*) _LT_AC_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_AC_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_AC_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_AC_TAGVAR(ld_shlibs, $1)=no ;; esac fi ]) AC_MSG_RESULT([$_LT_AC_TAGVAR(ld_shlibs, $1)]) test "$_LT_AC_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi # # Do we need to explicitly link libc? # case "x$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_AC_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_MSG_CHECKING([whether -lc should be explicitly linked in]) $rm conftest* printf "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_AC_TAGVAR(lt_prog_compiler_wl, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_AC_TAGVAR(allow_undefined_flag, $1) _LT_AC_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_AC_TAGVAR(archive_cmds, $1) 2\>\&1 \| grep \" -lc \" \>/dev/null 2\>\&1) then _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=no else _LT_AC_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_AC_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $rm conftest* AC_MSG_RESULT([$_LT_AC_TAGVAR(archive_cmds_need_lc, $1)]) ;; esac fi ;; esac ])# AC_LIBTOOL_PROG_LD_SHLIBS # _LT_AC_FILE_LTDLL_C # ------------------- # Be careful that the start marker always follows a newline. AC_DEFUN([_LT_AC_FILE_LTDLL_C], [ # /* ltdll.c starts here */ # #define WIN32_LEAN_AND_MEAN # #include # #undef WIN32_LEAN_AND_MEAN # #include # # #ifndef __CYGWIN__ # # ifdef __CYGWIN32__ # # define __CYGWIN__ __CYGWIN32__ # # endif # #endif # # #ifdef __cplusplus # extern "C" { # #endif # BOOL APIENTRY DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved); # #ifdef __cplusplus # } # #endif # # #ifdef __CYGWIN__ # #include # DECLARE_CYGWIN_DLL( DllMain ); # #endif # HINSTANCE __hDllInstance_base; # # BOOL APIENTRY # DllMain (HINSTANCE hInst, DWORD reason, LPVOID reserved) # { # __hDllInstance_base = hInst; # return TRUE; # } # /* ltdll.c ends here */ ])# _LT_AC_FILE_LTDLL_C # _LT_AC_TAGVAR(VARNAME, [TAGNAME]) # --------------------------------- AC_DEFUN([_LT_AC_TAGVAR], [ifelse([$2], [], [$1], [$1_$2])]) # old names AC_DEFUN([AM_PROG_LIBTOOL], [AC_PROG_LIBTOOL]) AC_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AC_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AC_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) AC_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) AC_DEFUN([AM_PROG_LD], [AC_PROG_LD]) AC_DEFUN([AM_PROG_NM], [AC_PROG_NM]) # This is just to silence aclocal about the macro not being used ifelse([AC_DISABLE_FAST_INSTALL]) AC_DEFUN([LT_AC_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj, no) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS) ]) AC_DEFUN([LT_AC_PROG_RC], [AC_CHECK_TOOL(RC, windres, no) ]) # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # # LT_AC_PROG_SED # -------------- # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. AC_DEFUN([LT_AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && break cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done SED=$lt_cv_path_SED ]) AC_MSG_RESULT([$SED]) ]) # -*- Autoconf -*- # Copyright (C) 2002, 2003 Free Software Foundation, Inc. # Generated from amversion.in; do not edit by hand. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version="1.8"]) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION so it can be traced. # This function is AC_REQUIREd by AC_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.8.2])]) # AM_AUX_DIR_EXPAND # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to `$srcdir/foo'. In other projects, it is set to # `$srcdir', `$srcdir/..', or `$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is `.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 6 # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ(2.52)dnl ifelse([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE]) AC_SUBST([$1_FALSE]) if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]) fi])]) # serial 6 -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # There are a few dirty hacks below to avoid letting `AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "GCJ", or "OBJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl ifelse([$1], CC, [depcc="$CC" am_compiler_list=], [$1], CXX, [depcc="$CXX" am_compiler_list=], [$1], OBJC, [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], GCJ, [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named `D' -- because `-MD' means `put the output # in D'. mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c : > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf case $depmode in nosideeffect) # after this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; none) break ;; esac # We check with `-c' and `-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle `-M -o', and we need to detect this. if depmode=$depmode \ source=sub/conftest.c object=sub/conftest.${OBJEXT-o} \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c -o sub/conftest.${OBJEXT-o} sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftest.${OBJEXT-o} sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # (even with -Werror). So we grep stderr for any message # that says an option was ignored. if grep 'ignoring option' conftest.err >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am_V~~~LIBXML2-2_6_13.bck$kwE)[TOOLS.LIBSRC.libxml2-2_6_13]aclocal.m4;1?^_leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE(dependency-tracking, [ --disable-dependency-tracking speeds up one-time build --enable-dependency-tracking do not reject slow dependency extractors]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH]) ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. #serial 2 # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [for mf in $CONFIG_FILES; do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named `Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # So let's grep whole file. if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi grep '^DEP_FILES *= *[[^ @%:@]]' < "$mf" > /dev/null || continue # Extract the definition of DEP_FILES from the Makefile without # running `make'. DEPDIR=`sed -n -e '/^DEPDIR = / s///p' < "$mf"` test -z "$DEPDIR" && continue # When using ansi2knr, U may be empty or an underscore; expand it U=`sed -n -e '/^U = / s///p' < "$mf"` test -d "$dirpart/$DEPDIR" || mkdir "$dirpart/$DEPDIR" # We invoke sed twice because it is the simplest approach to # changing $(DEPDIR) to its actual value in the expansion. for file in `sed -n -e ' /^DEP_FILES = .*\\\\$/ { s/^DEP_FILES = // :loop s/\\\\$// p n /\\\\$/ b loop p } /^DEP_FILES = / s/^DEP_FILES = //p' < "$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each `.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Like AC_CONFIG_HEADER, but automatically create stamp file. -*- Autoconf -*- # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 7 # AM_CONFIG_HEADER is obsolete. It has been replaced by AC_CONFIG_HEADERS. AU_DEFUN([AM_CONFIG_HEADER], [AC_CONFIG_HEADERS($@)]) # Do all the work for Automake. -*- Autoconf -*- # This macro actually does too much some checks are only needed if # your package does certain things. But this isn't really a big deal. # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 11 # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.58])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl # test to see if srcdir already configured if test "`cd $srcdir && pwd`" != "`pwd`" && test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED(PACKAGE, "$PACKAGE", [Name of package]) AC_DEFINE_UNQUOTED(VERSION, "$VERSION", [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG(ACLOCAL, aclocal-${am__api_version}) AM_MISSING_PROG(AUTOCONF, autoconf) AM_MISSING_PROG(AUTOMAKE, automake-${am__api_version}) AM_MISSING_PROG(AUTOHEADER, autoheader) AM_MISSING_PROG(MAKEINFO, makeinfo) AM_MISSING_PROG(AMTAR, tar) AM_PROG_INSTALL_SH AM_PROG_INSTALL_STRIP AC_REQUIRE([AM_PROG_MKDIR_P])dnl # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES(CC)], [define([AC_PROG_CC], defn([AC_PROG_CC])[_AM_DEPENDENCIES(CC)])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES(CXX)], [define([AC_PROG_CXX], defn([AC_PROG_CXX])[_AM_DEPENDENCIES(CXX)])])dnl ]) ]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $1 | $1:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $1" >`AS_DIRNAME([$1])`/stamp-h[]$_am_stamp_count]) # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl install_sh=${install_sh-"$am_aux_dir/install-sh"} AC_SUBST(install_sh)]) # -*- Autoconf -*- # Copyright (C) 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 1 # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo done .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # We grep out `Entering directory' and `Leaving directory' # messages which can occur if `w' ends up in MAKEFLAGS. # In particular we don't look at `^make:' because GNU make might # be invoked under some other name (usually "gmake"), in which # case it prints its new name instead of `make'. if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then am__include=include am__quote= _am_result=GNU fi # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then am__include=.include am__quote="\"" _am_result=BSD fi fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # -*- Autoconf -*- # Copyright (C) 1997, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it supports --run. # If it does, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl test x"${MISSING+set}" = xset || MISSING="\${SHELL} $am_aux_dir/missing" # Use eval to expand $SHELL if eval "$MISSING --run true"; then am_missing_run="$MISSING --run " else am_missing_run= AC_MSG_WARN([`missing' script is too old or missing]) fi ]) # AM_PROG_MKDIR_P # --------------- # Check whether `mkdir -p' is supported, fallback to mkinstalldirs otherwise. # Copyright (C) 2003, 2004 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # Automake 1.8 used `mkdir -m 0755 -p --' to ensure that directories # created by `make install' are always world readable, even if the # installer happens to have an overly restrictive umask (e.g. 077). # This was a mistake. There are at least two reasons why we must not # use `-m 0755': # - it causes special bits like SGID to be ignored, # - it may be too restrictive (some setups expect 775 directories). # # Do not use -m 0755 and let people choose whatever they expect by # setting umask. AC_DEFUN([AM_PROG_MKDIR_P], [if mkdir -p -- . 2>/dev/null; then # Keeping the `.' argument allows $(mkdir_p) to be used without # argument. Indeed, we sometimes output rules like # $(mkdir_p) $(somedir) # where $(somedir) is conditionally defined. # (`test -n '$(somedir)' && $(mkdir_p) $(somedir)' is a more # expensive solution, as it forces Make to start a sub-shell.) mkdir_p='mkdir -p -- .' else # On NextStep and OpenStep, the `mkdir' command does not # recognize any option. It will interpret all options as # directories to create, and then abort because `.' already # exists. for d in ./-p ./--; do test -d $d && rmdir $d done # $(mkinstalldirs) is defined by Automake if mkinstalldirs exists. if test -f "$ac_aux_dir/mkinstalldirs"; then mkdir_p='$(mkinstalldirs)' else mkdir_p='$(install_sh) -d' fi fi AC_SUBST([mkdir_p])]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001, 2002, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 2 # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # ------------------------------ # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), 1)]) # _AM_SET_OPTIONS(OPTIONS) # ---------------------------------- # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [AC_FOREACH([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1996, 1997, 1998, 2000, 2001, 2002, 2003 # Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 AC_DEFUN([AM_C_PROTOTYPES], [AC_REQUIRE([AC_C_PROTOTYPES]) if test "$ac_cv_prog_cc_stdc" != no; then U= ANSI2KNR= else U=_ ANSI2KNR=./ansi2knr fi # Ensure some checks needed by ansi2knr itself. AC_REQUIRE([AC_HEADER_STDC]) AC_CHECK_HEADERS(string.h) AC_SUBST(U)dnl AC_SUBST(ANSI2KNR)dnl ]) AU_DEFUN([fp_C_PROTOTYPES], [AM_C_PROTOTYPES]) # # Check to make sure that the build environment is sane. # # Copyright (C) 1996, 1997, 2000, 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # serial 3 # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Just in case sleep 1 echo timestamp > conftest.file # Do `set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( set X `ls -Lt $srcdir/configure conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t $srcdir/configure conftest.file` fi rm -f conftest.file if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT(yes)]) # AM_PROG_INSTALL_STRIP # Copyright (C) 2001, 2003 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA # 02111-1307, USA. # One issue with vendor `install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in `make install-strip', and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using `strip' when the user # run `make install-strip'. However `strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the `STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be `maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\${SHELL} \$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) m4_include([acinclude.m4]) 0'*[TOOLS.LIBSRC.libxml2-2_6_13]AUTHORS.;1+,4.#/ 4#-wE0123KPWO$56T?7y?#Q~89]^_`GHJDaniel Veillard Bjorn Reese William Brack Igor Zlatkovic for the Windows port Aleksey Sanin 0%*[TOOLS.LIBSRC.libxml2-2_6_13]c14n.c;1+,qA./ 4z-wE0123KPWO56?7W$$Q~89]^_`GHJ/* * "Canonical XML" implementation * http://www.w3.org/TR/xml-c14n * * "Exclusive XML Canonicalization" implementation * http://www.w3.org/TR/xml-exc-c14n * * See Copyright for the status of this software. * * Author: Aleksey Sanin */ #define IN_LIBXML #include "libxml.h" #ifdef LIBXML_C14N_ENABLED #ifdef LIBXML_OUTPUT_ENABLED #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #include #include #include #include /************************************************************************ * * * Some declaration better left private ATM * * * ************************************************************************/ typedef enum { XMLC14N_BEFORE_DOCUMENT_ELEMENT = 0, XMLC14N_INSIDE_DOCUMENT_ELEMENT = 1, XMLC14N_AFTER_DOCUMENT_ELEMENT = 2 } xmlC14NPosition; typedef struct _xmlC14NVisibleNsStack { int nsCurEnd; /* number of nodes in the set */ int nsPrevStart; /* the begginning of the stack for previous visible node */ int nsPrevEnd; /* the end of the stack for previous visible node */ int nsMax; /* size of the array as allocated */ xmlNsPtr *nsTab; /* array of ns in no particular order */ xmlNodePtr *nodeTab;/* array of nodes in no particular order */ } xmlC14NVisibleNsStack, *xmlC14NVisibleNsStackPtr; typedef struct _xmlC14NCtx { /* input parameters */ xmlDocPtr doc; xmlC14NIsVisibleCallback is_visible_callback; void* user_data; int with_comments; xmlOutputBufferPtr buf; /* position in the XML document */ xmlC14NPosition pos; int parent_is_doc; xmlC14NVisibleNsStackPtr ns_rendered; /* exclusive canonicalization */ int exclusive; xmlChar **inclusive_ns_prefixes; /* error number */ int error; } xmlC14NCtx, *xmlC14NCtxPtr; static xmlC14NVisibleNsStackPtr xmlC14NVisibleNsStackCreate (void); static void xmlC14NVisibleNsStackDestroy (xmlC14NVisibleNsStackPtr cur); static void xmlC14NVisibleNsStackAdd (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node); static void xmlC14NVisibleNsStackSave (xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state); static void xmlC14NVisibleNsStackRestore (xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state); static void xmlC14NVisibleNsStackShift (xmlC14NVisibleNsStackPtr cur); static int xmlC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns); static int xmlExcC14NVisibleNsStackFind (xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NCtxPtr ctx); static int xmlC14NIsNodeInNodeset (xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent); static int xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur); static int xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur); typedef enum { XMLC14N_NORMALIZE_ATTR = 0, XMLC14N_NORMALIZE_COMMENT = 1, XMLC14N_NORMALIZE_PI = 2, XMLC14N_NORMALIZE_TEXT = 3 } xmlC14NNormalizationMode; static xmlChar *xmlC11NNormalizeString(const xmlChar * input, xmlC14NNormalizationMode mode); #define xmlC11NNormalizeAttr( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_ATTR) #define xmlC11NNormalizeComment( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_COMMENT) #define xmlC11NNormalizePI( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_PI) #define xmlC11NNormalizeText( a ) \ xmlC11NNormalizeString((a), XMLC14N_NORMALIZE_TEXT) #define xmlC14NIsVisible( ctx, node, parent ) \ (((ctx)->is_visible_callback != NULL) ? \ (ctx)->is_visible_callback((ctx)->user_data, \ (xmlNodePtr)(node), (xmlNodePtr)(parent)) : 1) /************************************************************************ * * * Some factorized error routines * * * ************************************************************************/ /** * xmlC14NErrMemory: * @extra: extra informations * * Handle a redefinition of attribute error */ static void xmlC14NErrMemory(const char *extra) { __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_C14N, XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, extra, NULL, NULL, 0, 0, "Memory allocation failed : %s\n", extra); } /** * xmlC14NErr: * @ctxt: a C14N evaluation context * @node: the context node * @error: the erorr code * @msg: the message * @extra: extra informations * * Handle a redefinition of attribute error */ static void xmlC14NErr(xmlC14NCtxPtr ctxt, xmlNodePtr node, int error, const char * msg) { if (ctxt != NULL) ctxt->error = error; __xmlRaiseError(NULL, NULL, NULL, ctxt, node, XML_FROM_C14N, error, XML_ERR_ERROR, NULL, 0, NULL, NULL, NULL, 0, 0, msg); } /************************************************************************ * * * The implementation internals * * * ************************************************************************/ #define XML_NAMESPACES_DEFAULT 16 static int xmlC14NIsNodeInNodeset(xmlNodeSetPtr nodes, xmlNodePtr node, xmlNodePtr parent) { if((nodes != NULL) && (node != NULL)) { if(node->type != XML_NAMESPACE_DECL) { return(xmlXPathNodeSetContains(nodes, node)); } else { xmlNs ns; memcpy(&ns, node, sizeof(ns)); /* this is a libxml hack! check xpath.c for details */ if((parent != NULL) && (parent->type == XML_ATTRIBUTE_NODE)) { ns.next = (xmlNsPtr)parent->parent; } else { ns.next = (xmlNsPtr)parent; } /* * If the input is an XPath node-set, then the node-set must explicitly * contain every node to be rendered to the canonical form. */ return(xmlXPathNodeSetContains(nodes, (xmlNodePtr)&ns)); } } return(1); } static xmlC14NVisibleNsStackPtr xmlC14NVisibleNsStackCreate(void) { xmlC14NVisibleNsStackPtr ret; ret = (xmlC14NVisibleNsStackPtr) xmlMalloc(sizeof(xmlC14NVisibleNsStack)); if (ret == NULL) { xmlC14NErrMemory("creating stack"); return(NULL); } memset(ret, 0 , (size_t) sizeof(xmlC14NVisibleNsStack)); return(ret); } static void xmlC14NVisibleNsStackDestroy(xmlC14NVisibleNsStackPtr cur) { if(cur == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackDestroy: cur is null.\n"); #endif return; } if(cur->nsTab != NULL) { memset(@ f#~LIBXML2-2_6_13.bckqAwE%[TOOLS.LIBSRC.libxml2-2_6_13]c14n.c;1g|cur->nsTab, 0, cur->nsMax * sizeof(xmlNsPtr)); xmlFree(cur->nsTab); } if(cur->nodeTab != NULL) { memset(cur->nodeTab, 0, cur->nsMax * sizeof(xmlNodePtr)); xmlFree(cur->nodeTab); } memset(cur, 0, sizeof(xmlC14NVisibleNsStack)); xmlFree(cur); } static void xmlC14NVisibleNsStackAdd(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlNodePtr node) { if((cur == NULL) || ((cur->nsTab == NULL) && (cur->nodeTab != NULL)) || ((cur->nsTab != NULL) && (cur->nodeTab == NULL))) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackAdd: cur is null.\n"); #endif return; } if ((cur->nsTab == NULL) && (cur->nodeTab == NULL)) { cur->nsTab = (xmlNsPtr*) xmlMalloc(XML_NAMESPACES_DEFAULT * sizeof(xmlNsPtr)); cur->nodeTab = (xmlNodePtr*) xmlMalloc(XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr)); if ((cur->nsTab == NULL) || (cur->nodeTab == NULL)) { xmlC14NErrMemory("adding node to stack"); return; } memset(cur->nsTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNsPtr)); memset(cur->nodeTab, 0 , XML_NAMESPACES_DEFAULT * sizeof(xmlNodePtr)); cur->nsMax = XML_NAMESPACES_DEFAULT; } else if(cur->nsMax == cur->nsCurEnd) { void *tmp; int tmpSize; tmpSize = 2 * cur->nsMax; tmp = xmlRealloc(cur->nsTab, tmpSize * sizeof(xmlNsPtr)); if (tmp == NULL) { xmlC14NErrMemory("adding node to stack"); return; } cur->nsTab = (xmlNsPtr*)tmp; tmp = xmlRealloc(cur->nodeTab, tmpSize * sizeof(xmlNodePtr)); if (tmp == NULL) { xmlC14NErrMemory("adding node to stack"); return; } cur->nodeTab = (xmlNodePtr*)tmp; cur->nsMax = tmpSize; } cur->nsTab[cur->nsCurEnd] = ns; cur->nodeTab[cur->nsCurEnd] = node; ++cur->nsCurEnd; } static void xmlC14NVisibleNsStackSave(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state) { if((cur == NULL) || (state == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackSave: cur or state is null.\n"); #endif return; } state->nsCurEnd = cur->nsCurEnd; state->nsPrevStart = cur->nsPrevStart; state->nsPrevEnd = cur->nsPrevEnd; } static void xmlC14NVisibleNsStackRestore(xmlC14NVisibleNsStackPtr cur, xmlC14NVisibleNsStackPtr state) { if((cur == NULL) || (state == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackRestore: cur or state is null.\n"); #endif return; } cur->nsCurEnd = state->nsCurEnd; cur->nsPrevStart = state->nsPrevStart; cur->nsPrevEnd = state->nsPrevEnd; } static void xmlC14NVisibleNsStackShift(xmlC14NVisibleNsStackPtr cur) { if(cur == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackRestore: cur is null.\n"); #endif return; } cur->nsPrevStart = cur->nsPrevEnd; cur->nsPrevEnd = cur->nsCurEnd; } static int xmlC14NStrEqual(const xmlChar *str1, const xmlChar *str2) { if (str1 == str2) return(1); if (str1 == NULL) return((*str2) == '\0'); if (str2 == NULL) return((*str1) == '\0'); do { if (*str1++ != *str2) return(0); } while (*str2++); return(1); } /** * xmlC14NVisibleNsStackFind: * @ctx: the C14N context * @ns: the namespace to check * * Checks whether the given namespace was already rendered or not * * Returns 1 if we already wrote this namespace or 0 otherwise */ static int xmlC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns) { int i; const xmlChar *prefix; const xmlChar *href; int has_empty_ns; if(cur == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NVisibleNsStackFind: cur is null.\n"); #endif return (0); } /* * if the default namespace xmlns="" is not defined yet then * we do not want to print it out */ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix; href = ((ns == NULL) || (ns->href == NULL)) ? BAD_CAST "" : ns->href; has_empty_ns = (xmlC14NStrEqual(prefix, NULL) && xmlC14NStrEqual(href, NULL)); if (cur->nsTab != NULL) { int start = (has_empty_ns) ? 0 : cur->nsPrevStart; for (i = cur->nsCurEnd - 1; i >= start; --i) { xmlNsPtr ns1 = cur->nsTab[i]; if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) { return(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)); } } } return(has_empty_ns); } static int xmlExcC14NVisibleNsStackFind(xmlC14NVisibleNsStackPtr cur, xmlNsPtr ns, xmlC14NCtxPtr ctx) { int i; const xmlChar *prefix; const xmlChar *href; int has_empty_ns; if(cur == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlExcC14NVisibleNsStackFind: cur is null.\n"); #endif return (0); } /* * if the default namespace xmlns="" is not defined yet then * we do not want to print it out */ prefix = ((ns == NULL) || (ns->prefix == NULL)) ? BAD_CAST "" : ns->prefix; href = ((ns == NULL) || (ns->href == NULL)) ? BAD_CAST "" : ns->href; has_empty_ns = (xmlC14NStrEqual(prefix, NULL) && xmlC14NStrEqual(href, NULL)); if (cur->nsTab != NULL) { int start = 0; for (i = cur->nsCurEnd - 1; i >= start; --i) { xmlNsPtr ns1 = cur->nsTab[i]; if(xmlC14NStrEqual(prefix, (ns1 != NULL) ? ns1->prefix : NULL)) { if(xmlC14NStrEqual(href, (ns1 != NULL) ? ns1->href : NULL)) { return(xmlC14NIsVisible(ctx, ns1, cur->nodeTab[i])); } else { return(0); } } } } return(has_empty_ns); } /** * xmlC14NIsXmlNs: * @ns: the namespace to check * * Checks whether the given namespace is a default "xml:" namespace * with href="http://www.w3.org/XML/1998/namespace" * * Returns 1 if the node is default or 0 otherwise */ /* todo: make it a define? */ static int xmlC14NIsXmlNs(xmlNsPtr ns) { return ((ns != NULL) && (xmlStrEqual(ns->prefix, BAD_CAST "xml")) && (xmlStrEqual(ns->href, BAD_CAST "http://www.w3.org/XML/1998/namespace"))); } /** * xmlC14NNsCompare: * @ns1: the pointer to first namespace * @ns2: the pointer to second namespace * * Compares the namespaces by names (prefixes). * * Returns -1 if ns1 < ns2, 0 if ns1 == ns2 or 1 if ns1 > ns2. */ static int xmlC14NNsCompare(xmlNsPtr ns1, xmlNsPtr ns2) { if (ns1 == ns2) return (0); if (ns1 == NULL) return (-1); if (ns2 == NULL) return (1); return (xmlStrcmp(ns1->prefix, ns2->prefix)); } /** * xmlC14NPrintNamespaces: * @ns: the pointer to namespace * @ctx: the C14N context * * Prints the given namespace to the output buffer from C14N context. * * Returns 1 on success or 0 on fail. */ static int xmlC14NPrintNamespaces(const xmlNsPtr ns, xmlC14NCtxPtr ctx) { if ((ns == NULL) || (ctx == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NPrintNamespace: namespace or context pointer is null\n"); #endif return 0; } if (ns->prefix != NULL) { xmlOutputBufferWriteString(ctx->buf, " xmlns:"); xmlOutputBufferWriteString(ctx->buf, (const char *) ns->prefix); xmlOutputBufferWriteString(ctx->buf, "=\""); } else { xmlOutputBufferWriteString(ctx->buf, " xmlns=\""); } if(ns->href != NULL) { xmlOutputBufferWriteString(ctx->buf, (const char *) ns->href); } xmlOutputBufferWriteString(ctx->buf, "\""); return (1); } /** * xmlC14NProcessNamespacesAxis: * @ctx: the C14N context * @node: the current node * * Prints out canonical namespace axis of the current node to the * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Namespace Axis * Consider a list L containing only namespace nodes in the * axis and in the node-set in lexicographic order (ascending). To begin * processing L, if the first node is not the default namespace node (a node * with no namespace URI and no local name), then generate a space followed * by xmlns="" if and only if the following conditions are met: * - the element E that owns the axis is in the node-set * - The nearest ancestor element of E in the node-set has a default * namespace node in the node-set (default namespace nodes always * have non-empty values in XPath) * The latter condition eliminates unnecessary occurrences of xmlns="" in * the canonical form since an element only receives an xmlns="" if its * default namespace is empty and if it has an immediate parent in the * canonical form that has a non-empty default namespace. To finish * processing L, simply process every namespace node in L, except omit * namespace node with local name xml, which defines the xml prefix, * if its string value is http://www.w3.org/XML/1998/namespace. * * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n) * Canonical XML applied to a document subset requires the search of the * ancestor nodes of each orphan element node for attributes in the xml * namespace, such as xml:lang and xml:space. These are copied into the * element node except if a declaration of the same attribute is already * in the attribute axis of the element (whether or not it is included in * the document subset). This search and copying are omitted from the * Exclusive XML Canonicalization method. * * Returns 0 on success or -1 on fail. */ static int xmlC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) { xmlNodePtr n; xmlNsPtr ns, tmp; xmlListPtr list; int already_rendered; int has_empty_ns = 0; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNamespacesAxis: Null context or node pointer or type != XML_ELEMENT_NODE.\n"); #endif return (-1); } /* * Create a sorted list to store element namespaces */ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NNsCompare); if (list == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNamespacesAxis: list creation failed\n"); #endif return (-1); } /* check all namespaces */ for(n = cur; n != NULL; n = n->parent) { for(ns = n->nsDef; ns != NULL; ns = ns->next) { tmp = xmlSearchNs(cur->doc, cur, ns->prefix); if((tmp == ns) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) { already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns); if(visible) { xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(!already_rendered) { xmlListInsert(list, ns); } if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } } } /** * if the first node is not the default namespace node (a node with no * namespace URI and no local name), then generate a space followed by * xmlns="" if and only if the following conditions are met: * - the element E that owns the axis is in the node-set * - the nearest ancestor element of E in the node-set has a default * namespace node in the node-set (default namespace nodes always * have non-empty values in XPath) */ if(visible && !has_empty_ns) { static xmlNs ns_default; memset(&ns_default, 0, sizeof(ns_default)); if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) { xmlC14NPrintNamespaces(&ns_default, ctx); } } /* * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); /* * Cleanup */ xmlListDelete(list); return (0); } /** * xmlExcC14NProcessNamespacesAxis: * @ctx: the C14N context * @node: the current node * * Prints out exclusive canonical namespace axis of the current node to the * buffer from C14N context as follows * * Exclusive XML Canonicalization * http://www.w3.org/TR/xml-exc-c14n * * If the element node is in the XPath subset then output the node in * accordance with Canonical XML except for namespace nodes which are * rendered as follows: * * 1. Render each namespace node iff: * * it is visibly utilized by the immediate parent element or one of * its attributes, or is present in InclusiveNamespaces PrefixList, and * * its prefix and value do not appear in ns_rendered. ns_rendered is * obtained by popping the state stack in order to obtain a list of * prefixes and their values which have already been rendered by * an output ancestor of the namespace node's parent element. * 2. Append the rendered namespace node to the list ns_rendered of namespace * nodes rendered by output ancestors. Push ns_rendered on state stack and * recurse. * 3. After the recursion returns, pop thestate stack. * * * Returns 0 on success or -1 on fail. */ static int xmlExcC14NProcessNamespacesAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) { xmlNsPtr ns; xmlListPtr list; xmlAttrPtr attr; int already_rendered; int has_empty_ns = 0; int has_visibly_utilized_empty_ns = 0; int has_empty_ns_in_inclusive_list = 0; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlExcC14NProcessNamespacesAxis: Null context or node pointer or type != XML_ELEMENT_NODE.\n"); #endif return (-1); } if(!ctx->exclusive) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlExcC14NProcessNamespacesAxis: called for non-exclusive canonization or rendered stack is NULL.\n"); #endif return (-1); } /* * Create a sorted list to store element namespaces */ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NNsCompare); if (list == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlExcC14NProcessNamespacesAxis: list creation failed\n"); #endif return (-1); } /* * process inclusive namespaces: * All namespace nodes appearing on inclusive ns list are * handled as provided in Canonical XML */ if(ctx->inclusive_ns_prefixes != NULL) { xmlChar *prefix; int i; for (i = 0; ctx->inclusive_ns_prefixes[i] != NULL; ++i) { prefix = ctx->inclusive_ns_prefixes[i]; /* * Special values for namespace with empty prefix */ if (xmlStrEqual(prefix, BAD_CAST "#default") || xmlStrEqual(prefix, BAD_CAST "")) { prefix = NULL; has_empty_ns_in_inclusive_list = 1; } ns = xmlSearchNs(cur->doc, cur, prefix); if((ns != NULL) && !xmlC14NIsXmlNs(ns) && xmlC14NIsVisible(ctx, ns, cur)) { already_rendered = xmlC14NVisibleNsStackFind(ctx->ns_rendered, ns); if(visible) { xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(!already_rendered) { xmlListInsert(list, ns); } if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } } } /* add node namespace */ if(cur->ns != NULL) { ns = cur->ns; } else { ns = xmlSearchNs(cur->doc, cur, NULL); has_visibly_utilized_empty_ns = 1; } if((ns != NULL) && !xmlC14NIsXmlNs(ns)) { if(visible && xmlC14NIsVisible(ctx, ns, cur)) { if(!xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, ns, ctx)) { xmlListInsert(list, ns); } } if(visible) { xmlC14NVisibleNsStackAdd(ctx->ns_rendered, ns, cur); } if(xmlStrlen(ns->prefix) == 0) { has_empty_ns = 1; } } /* add attributes */ for(attr = cur->properties; attr != NULL; attr = attr->next) { /* * we need to check that attribute is visible and has non * default namespace (XML Namespaces: "default namespaces * do not apply directly to attributes") */ if((attr->ns != NULL) && xmlC14NIsVisible(ctx, attr, cur)) { already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, attr->ns, ctx); xmlC14NVisibleNsStackAdd(ctx->ns_rendered, attr->ns, cur); if(!already_rendered && visible) { xmlListInsert(list, attr->ns); } if(xmlStrlen(attr->ns->prefix) == 0) { has_empty_ns = 1; } } else if(attr->ns == NULL) { has_visibly_utilized_empty_ns = 1; } } /* * Process xmlns="" */ if(visible && has_visibly_utilized_empty_ns && !has_empty_ns && !has_empty_ns_in_inclusive_list) { static xmlNs ns_default; memset(&ns_default, 0, sizeof(ns_default)); already_rendered = xmlExcC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default, ctx); if(!already_rendered) { xmlC14NPrintNamespaces(&ns_default, ctx); } } else if(visible && !has_empty_ns && has_empty_ns_in_inclusive_list) { static xmlNs ns_default; memset(&ns_default, 0, sizeof(ns_default)); if(!xmlC14NVisibleNsStackFind(ctx->ns_rendered, &ns_default)) { xmlC14NPrintNamespaces(&ns_default, ctx); } } /* * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintNamespaces, (const void *) ctx); /* * Cleanup */ xmlListDelete(list); return (0); } /** * xmlC14NAttrsCompare: * @attr1: the pointer tls o first attr * @attr2: the pointer to second attr * * Prints the given attribute to the output buffer from C14N context. * * Returns -1 if attr1 < attr2, 0 if attr1 == attr2 or 1 if attr1 > attr2. */ static int xmlC14NAttrsCompare(xmlAttrPtr attr1, xmlAttrPtr attr2) { int ret = 0; /* * Simple cases */ if (attr1 == attr2) return (0); if (attr1 == NULL) return (-1); if (attr2 == NULL) return (1); if (attr1->ns == attr2->ns) { return (xmlStrcmp(attr1->name, attr2->name)); } /* * Attributes in the default namespace are first * because the default namespace is not applied to * unqualified attributes */ if (attr1->ns == NULL) return (-1); if (attr2->ns == NULL) return (1); if (attr1->ns->prefix == NULL) return (-1); if (attr2->ns->prefix == NULL) return (1); ret = xmlStrcmp(attr1->ns->href, attr2->ns->href); if (ret == 0) { ret = xmlStrcmp(attr1->name, attr2->name); } return (ret); } /** * xmlC14NPrintAttrs: * @attr: the pointer to attr * @ctx: the C14N context * * Prints out canonical attribute urrent node to the * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Returns 1 on success or 0 on fail. */ static int xmlC14NPrintAttrs(const xmlAttrPtr attr, xmlC14NCtxPtr ctx) { xmlChar *value; xmlChar *buffer; if ((attr == NULL) || (ctx == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NPrintAttrs: attr == NULL or ctx == NULL\n"); #endif return (0); } xmlOutputBufferWriteString(ctx->buf, " "); if (attr->ns != NULL && xmlStrlen(attr->ns->prefix) > 0) { xmlOutputBufferWriteString(ctx->buf, (const char *) attr->ns->prefix); xmlOutputBufferWriteString(ctx->buf, ":"); } xmlOutputBufferWriteString(ctx->buf, (const char *) attr->name); xmlOutputBufferWriteString(ctx->buf, "=\""); value = xmlNodeListGetString(attr->doc, attr->children, 1); /* todo: should we log an error if value==NULL ? */ if (value != NULL) { buffer = xmlC11NNormalizeAttr(value); xmlFree(value); if (buffer != NULL) { xmlOutputBufferWriteString(ctx->buf, (const char *) buffer); xmlFree(buffer); } else { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NPrintAttrs: xmlC11NNormalizeAttr failed\n"); #endif return (0); } } xmlOutputBufferWriteString(ctx->buf, "\""); return (1); } /** * xmlC14NProcessAttrsAxis: * @ctx: the C14N context * @cur: the current node * * Prints out canonical attribute axis of the current node to the * buffer from C14N context as follows * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Attribute Axis * In lexicographic order (ascending), process each node that * is in the element's attribute axis and in the node-set. * * The processing of an element node E MUST be modified slightly * when an XPath node-set is given as input and the element's * parent is omitted from the node-set. * * * Exclusive XML Canonicalization v 1.0 (http://www.w3.org/TR/xml-exc-c14n) * * Canonical XML applied to a document subset requires the search of the * ancestor nodes of each orphan element node for attributes in the xml * namespace, such as xml:lang and xml:space. These are copied into the * element node except if a declaration of the same attribute is already * in the attribute axis of the element (whether or not it is included in * the document subset). This search and copying are omitted from the * Exclusive XML Canonicalization method. * * Returns 0 on success or -1 on fail. */ static int xmlC14NProcessAttrsAxis(xmlC14NCtxPtr ctx, xmlNodePtr cur) { xmlAttrPtr attr; xmlListPtr list; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessAttrsAxis: Null context or node pointer or type != XML_ELEMENT_NODE.\n"); #endif return (-1); } /* * Create a sorted list to store element attributes */ list = xmlListCreate(NULL, (xmlListDataCompare) xmlC14NAttrsCompare); if (list == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessAttrsAxis: list creation failed\n"); #endif return (-1); } /* * Add all visible attributes from current node. */ attr = cur->properties; while (attr != NULL) { /* check that attribute is visible */ if (xmlC14NIsVisible(ctx, attr, cur)) { xmlListInsert(list, attr); } attr = attr->next; } /* * include attributes in "xml" namespace defined in ancestors * (only for non-exclusive XML Canonicalization) */ if ((!ctx->exclusive) && (cur->parent != NULL) && (!xmlC14NIsVisible(ctx, cur->parent, cur->parent->parent))) { /* * If XPath node-set is not specified then the parent is always * visible! */ cur = cur->parent; while (cur != NULL) { attr = cur->properties; while (attr != NULL) { if ((attr->ns != NULL) && (xmlStrEqual(attr->ns->prefix, BAD_CAST "xml"))) { if (xmlListSearch(list, attr) == NULL) { xmlListInsert(list, attr); } } attr = attr->next; } cur = cur->parent; } } /* * print out all elements from list */ xmlListWalk(list, (xmlListWalker) xmlC14NPrintAttrs, (const void *) ctx); /* * Cleanup */ xmlListDelete(list); return (0); } /** * xmlC14NCheckForRelativeNamespaces: * @ctx: the C14N context * @cur: the current element node * * Checks that current element node has no relative namespaces defined * * Returns 0 if the node has no relative namespaces or -1 otherwise. */ static int xmlC14NCheckForRelativeNamespaces(xmlC14NCtxPtr ctx, xmlNodePtr cur) { xmlNsPtr ns; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NCheckForRelativeNamespaces: Null context or node pointer or type != XML_ELEMENT_NODE.\n"); #endif return (-1); } ns = cur->nsDef; while (ns != NULL) { if (xmlStrlen(ns->href) > 0) { xmlURIPtr uri; uri = xmlParseURI((const char *) ns->href); if (uri == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NCheckForRelativeNamespaces: unable to parse uri=\"%s\".\n", ns->href); #endif return (-1); } if (xmlStrlen((const xmlChar *) uri->scheme) == 0) { xmlFreeURI(uri); return (-1); } if ((!xmlStrEqual ((const xmlChar *) uri->scheme, BAD_CAST "urn")) && (xmlStrlen((const xmlChar *) uri->server) == 0)) { xmlFreeURI(uri); return (-1); } xmlFreeURI(uri); } ns = ns->next; } return (0); } /** * xmlC14NProcessElementNode: * @ctx: the pointer to C14N context object * @cur: the node to process * * Canonical XML v 1.0 (http://www.w3.org/TR/xml-c14n) * * Element Nodes * If the element is not in the node-set, then the result is obtained * by processing the namespace axis, then the attribute axis, then * processing the child nodes of the element that are in the node-set * (in document order). If the element is in the node-set, then the result * is an open angle bracket (<), the element QName, the result of * processing the namespace axis, the result of processing the attribute * axis, a close angle bracket (>), the result of processing the child * nodes of the element that are in the node-set (in document order), an * open angle bracket, a forward slash (/), the element QName, and a close * angle bracket. * * Returns non-negative value on success or negative value on fail */ static int xmlC14NProcessElementNode(xmlC14NCtxPtr ctx, xmlNodePtr cur, int visible) { int ret; xmlC14NVisibleNsStack state; int parent_is_doc = 0; if ((ctx == NULL) || (cur == NULL) || (cur->type != XML_ELEMENT_NODE)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessElementNode: Null context or node pointer or type != XML_ELEMENT_NODE.\n"); #endif return (-1); } /* * Check relative relative namespaces: * implementations of XML canonicalization MUST report an operation * failure on documents containing relative namespace URIs. */ if (xmlC14NCheckForRelativeNamespaces(ctx, cur) < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessElementNode: xmlC14NCheckForRelativeNamespaces failed.\n"); #endif return (-1); } /* * Save ns_rendered stack position */ xmlC14NVisibleNsStackSave(ctx->ns_rendered, &state); if (visible) { if (ctx->parent_is_doc) { /* save this flag into the stack */ parent_is_doc = ctx->parent_is_doc; ctx->parent_is_doc = 0; ctx->pos = XMLC14N_INSIDE_DOCUMENT_ELEMENT; } xmlOutputBufferWriteString(ctx->buf, "<"); if ((cur->ns != NULL) && (xmlStrlen(cur->ns->prefix) > 0)) { xmlOutputBufferWriteString(ctx->buf, (const char *) cur->ns->prefix); xmlOutputBufferWriteString(ctx->buf, ":"); } xmlOutputBufferWriteString(ctx->buf, (const char *) cur->name); } if (!ctx->exclusive) { ret = xmlC14NProcessNamespacesAxis(ctx, cur, visible); } else { ret = xmlExcC14NProcessNamespacesAxis(ctx, cur, visible); } if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessElementNode: xmlC14NProcessNamespacesAxis failed.\n"); #endif return (-1); } /* todo: shouldn't this go to "visible only"? */ if(visible) { xmlC14NVisibleNsStackShift(ctx->ns_rendered); } if(visible) { ret = xmlC14NProcessAttrsAxis(ctx, cur); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessElementNode: xmlC14NProcessAttrsAxis failed.\n"); #endif return (-1); } } if (visible) { xmlOutputBufferWriteString(ctx->buf, ">"); } if (cur->children != NULL) { ret = xmlC14NProcessNodeList(ctx, cur->children); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessElementNode: xmlC14NProcessNodeList failed.\n"); #endif return (-1); } } if (visible) { xmlOutputBufferWriteString(ctx->buf, "ns != NULL) && (xmlStrlen(cur->ns->prefix) > 0)) { xmlOutputBufferWriteString(ctx->buf, (const char *) cur->ns->prefix); xmlOutputBufferWriteString(ctx->buf, ":"); } xmlOutputBufferWriteString(ctx->buf, (const char *) cur->name); xmlOutputBufferWriteString(ctx->buf, ">"); if (parent_is_doc) { /* restore this flag from the stack for next node */ ctx->parent_is_doc = parent_is_doc; ctx->pos = XMLC14N_AFTER_DOCUMENT_ELEMENT; } } /* * Restore ns_rendered stack position */ xmlC14NVisibleNsStackRestore(ctx->ns_rendered, &state); return (0); } /** * xmlC14NProcessNode: * @ctx: the pointer to C14N context object * @cur: the node to process * * Processes the given node * * Returns non-negative value on success or negative value on fail */ static int xmlC14NProcessNode(xmlC14NCtxPtr ctx, xmlNodePtr cur) { int ret = 0; int visible; if ((ctx == NULL) || (cur == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNode: Null context or node pointer.\n"); #endif return (-1); } visible = xmlC14NIsVisible(ctx, cur, cur->parent); switch (cur->type) { case XML_ELEMENT_NODE: ret = xmlC14NProcessElementNode(ctx, cur, visible); break; case XML_CDATA_SECTION_NODE: case XML_TEXT_NODE: /* * Text Nodes * the string value, except all ampersands are replaced * by &, all open angle brackets (<) are replaced by <, all closing * angle brackets (>) are replaced by >, and all #xD characters are * replaced by . */ /* cdata sections are processed as text nodes */ /* todo: verify that cdata sections are included in XPath nodes set */ if ((visible) && (cur->content != NULL)) { xmlChar *buffer; buffer = xmlC11NNormalizeText(cur->content); if (buffer != NULL) { xmlOutputBufferWriteString(ctx->buf, (const char *) buffer); xmlFree(buffer); } else { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNode:  $~LIBXML2-2_6_13.bckqAwE%[TOOLS.LIBSRC.libxml2-2_6_13]c14n.c;1^LxmlC11NNormalizeText() failed\n"); #endif return (-1); } } break; case XML_PI_NODE: /* * Processing Instruction (PI) Nodes- * The opening PI symbol (). If the string value is empty, * then the leading space is not added. Also, a trailing #xA is * rendered after the closing PI symbol for PI children of the * root node with a lesser document order than the document * element, and a leading #xA is rendered before the opening PI * symbol of PI children of the root node with a greater document * order than the document element. */ if (visible) { if (ctx->pos == XMLC14N_AFTER_DOCUMENT_ELEMENT) { xmlOutputBufferWriteString(ctx->buf, "\x0Abuf, "buf, (const char *) cur->name); if ((cur->content != NULL) && (*(cur->content) != '\0')) { xmlChar *buffer; xmlOutputBufferWriteString(ctx->buf, " "); /* todo: do we need to normalize pi? */ buffer = xmlC11NNormalizePI(cur->content); if (buffer != NULL) { xmlOutputBufferWriteString(ctx->buf, (const char *) buffer); xmlFree(buffer); } else { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNode: xmlC11NNormalizePI() failed\n"); #endif return (-1); } } if (ctx->pos == XMLC14N_BEFORE_DOCUMENT_ELEMENT) { xmlOutputBufferWriteString(ctx->buf, "?>\x0A"); } else { xmlOutputBufferWriteString(ctx->buf, "?>"); } } break; case XML_COMMENT_NODE: /* * Comment Nodes * Nothing if generating canonical XML without comments. For * canonical XML with comments, generate the opening comment * symbol (). Also, a trailing #xA is rendered * after the closing comment symbol for comment children of the * root node with a lesser document order than the document * element, and a leading #xA is rendered before the opening * comment symbol of comment children of the root node with a * greater document order than the document element. (Comment * children of the root node represent comments outside of the * top-level document element and outside of the document type * declaration). */ if (visible && ctx->with_comments) { if (ctx->pos == XMLC14N_AFTER_DOCUMENT_ELEMENT) { xmlOutputBufferWriteString(ctx->buf, "\x0A\x0A"); } else { xmlOutputBufferWriteString(ctx->buf, "-->"); } } break; case XML_DOCUMENT_NODE: case XML_DOCUMENT_FRAG_NODE: /* should be processed as document? */ #ifdef LIBXML_DOCB_ENABLED case XML_DOCB_DOCUMENT_NODE: /* should be processed as document? */ #endif #ifdef LIBXML_HTML_ENABLED case XML_HTML_DOCUMENT_NODE: /* should be processed as document? */ #endif if (cur->children != NULL) { ctx->pos = XMLC14N_BEFORE_DOCUMENT_ELEMENT; ctx->parent_is_doc = 1; ret = xmlC14NProcessNodeList(ctx, cur->children); } break; case XML_ATTRIBUTE_NODE: xmlC14NErr(ctx, cur, XML_C14N_INVALID_NODE, "xmlC14NProcessNode: XML_ATTRIBUTE_NODE is illegal here\n"); return (-1); case XML_NAMESPACE_DECL: xmlC14NErr(ctx, cur, XML_C14N_INVALID_NODE, "xmlC14NProcessNode: XML_NAMESPACE_DECL is illegal here\n"); return (-1); case XML_ENTITY_REF_NODE: xmlC14NErr(ctx, cur, XML_C14N_INVALID_NODE, "xmlC14NProcessNode: XML_ENTITY_REF_NODE is illegal here\n"); return (-1); case XML_ENTITY_NODE: xmlC14NErr(ctx, cur, XML_C14N_INVALID_NODE, "xmlC14NProcessNode: XML_ENTITY_NODE is illegal here\n"); return (-1); case XML_DOCUMENT_TYPE_NODE: case XML_NOTATION_NODE: case XML_DTD_NODE: case XML_ELEMENT_DECL: case XML_ATTRIBUTE_DECL: case XML_ENTITY_DECL: #ifdef LIBXML_XINCLUDE_ENABLED case XML_XINCLUDE_START: case XML_XINCLUDE_END: #endif /* * should be ignored according to "W3C Canonical XML" */ break; default: #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNode: unknown node type = %d\n", cur->type); #endif return (-1); } return (ret); } /** * xmlC14NProcessNodeList: * @ctx: the pointer to C14N context object * @cur: the node to start from * * Processes all nodes in the row starting from cur. * * Returns non-negative value on success or negative value on fail */ static int xmlC14NProcessNodeList(xmlC14NCtxPtr ctx, xmlNodePtr cur) { int ret; if (ctx == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NProcessNodeList: Null context pointer.\n"); #endif return (-1); } for (ret = 0; cur != NULL && ret >= 0; cur = cur->next) { ret = xmlC14NProcessNode(ctx, cur); } return (ret); } /** * xmlC14NFreeCtx: * @ctx: the pointer to C14N context object * * Cleanups the C14N context object. */ static void xmlC14NFreeCtx(xmlC14NCtxPtr ctx) { if (ctx == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NFreeCtx: ctx == NULL\n"); #endif return; } if (ctx->ns_rendered != NULL) { xmlC14NVisibleNsStackDestroy(ctx->ns_rendered); } xmlFree(ctx); } /** * xmlC14NNewCtx: * @doc: the XML document for canonization * @is_visible_callback:the function to use to determine is node visible * or not * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) * @inclusive_ns_prefixe the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive * canonicalization) * @with_comments: include comments in the result (!=0) or not (==0) * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output * * Creates new C14N context object to store C14N parameters. * * Returns pointer to newly created object (success) or NULL (fail) */ static xmlC14NCtxPtr xmlC14NNewCtx(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, int exclusive, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { xmlC14NCtxPtr ctx = NULL; if ((doc == NULL) || (buf == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NNewCtx: pointer to document or output buffer is NULL\n"); #endif return (NULL); } /* * Validate the encoding output buffer encoding */ if (buf->encoder != NULL) { xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8, "xmlC14NNewCtx: output buffer encoder != NULL but C14N requires UTF8 output\n"); return (NULL); } /* * Validate the XML document encoding value, if provided. */ if (doc->charset != XML_CHAR_ENCODING_UTF8) { xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8, "xmlC14NNewCtx: source document not in UTF8\n"); return (NULL); } /* * Allocate a new xmlC14NCtxPtr and fill the fields. */ ctx = (xmlC14NCtxPtr) xmlMalloc(sizeof(xmlC14NCtx)); if (ctx == NULL) { xmlC14NErrMemory("creating context"); return (NULL); } memset(ctx, 0, sizeof(xmlC14NCtx)); /* * initialize C14N context */ ctx->doc = doc; ctx->with_comments = with_comments; ctx->is_visible_callback = is_visible_callback; ctx->user_data = user_data; ctx->buf = buf; ctx->parent_is_doc = 1; ctx->pos = XMLC14N_BEFORE_DOCUMENT_ELEMENT; ctx->ns_rendered = xmlC14NVisibleNsStackCreate(); if(ctx->ns_rendered == NULL) { xmlC14NErr(ctx, (xmlNodePtr) doc, XML_C14N_CREATE_STACK, "xmlC14NNewCtx: xmlC14NVisibleNsStackCreate failed\n"); xmlC14NFreeCtx(ctx); return (NULL); } /* * Set "exclusive" flag, create a nodes set for namespaces * stack and remember list of incluseve prefixes */ if (exclusive) { ctx->exclusive = 1; ctx->inclusive_ns_prefixes = inclusive_ns_prefixes; } return (ctx); } /** * xmlC14NExecute: * @doc: the XML document for canonization * @is_visible_callback:the function to use to determine is node visible * or not * @user_data: the first parameter for @is_visible_callback function * (in most cases, it is nodes set) * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; * otherwise - exclusive canonicalization) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) * @with_comments: include comments in the result (!=0) or not (==0) * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output * * Dumps the canonized image of given XML document into the provided buffer. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * * Returns non-negative value on success or a negative value on fail */ int xmlC14NExecute(xmlDocPtr doc, xmlC14NIsVisibleCallback is_visible_callback, void* user_data, int exclusive, xmlChar **inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { xmlC14NCtxPtr ctx; int ret; if ((buf == NULL) || (doc == NULL)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NExecute: null return buffer or doc pointer\n"); #endif return (-1); } /* * Validate the encoding output buffer encoding */ if (buf->encoder != NULL) { xmlC14NErr(NULL, (xmlNodePtr) doc, XML_C14N_REQUIRES_UTF8, "xmlC14NExecute: output buffer encoder != NULL but C14N requires UTF8 output\n"); return (-1); } ctx = xmlC14NNewCtx(doc, is_visible_callback, user_data, exclusive, inclusive_ns_prefixes, with_comments, buf); if (ctx == NULL) { xmlC14NErr(NULL, (xmlNodePtr) doc, XML_C14N_CREATE_CTXT, "xmlC14NExecute: unable to create C14N context\n"); return (-1); } /* * Root Node * The root node is the parent of the top-level document element. The * result of processing each of its child nodes that is in the node-set * in document order. The root node does not generate a byte order mark, * XML declaration, nor anything from within the document type * declaration. */ if (doc->children != NULL) { ret = xmlC14NProcessNodeList(ctx, doc->children); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NExecute: process childrens' list failed.\n"); #endif xmlC14NFreeCtx(ctx); return (-1); } } /* * Flush buffer to get number of bytes written */ ret = xmlOutputBufferFlush(buf); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NExecute: buffer flush failed.\n"); #endif xmlC14NFreeCtx(ctx); return (-1); } /* * Cleanup */ xmlC14NFreeCtx(ctx); return (ret); } /** * xmlC14NDocSaveTo: * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; * otherwise - exclusive canonicalization) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) * @with_comments: include comments in the result (!=0) or not (==0) * @buf: the output buffer to store canonical XML; this * buffer MUST have encoder==NULL because C14N requires * UTF-8 output * * Dumps the canonized image of given XML document into the provided buffer. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * * Returns non-negative value on success or a negative value on fail */ int xmlC14NDocSaveTo(xmlDocPtr doc, xmlNodeSetPtr nodes, int exclusive, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlOutputBufferPtr buf) { return(xmlC14NExecute(doc, (xmlC14NIsVisibleCallback)xmlC14NIsNodeInNodeset, nodes, exclusive, inclusive_ns_prefixes, with_comments, buf)); } /** * xmlC14NDocDumpMemory: * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; * otherwise - exclusive canonicalization) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) * @with_comments: include comments in the result (!=0) or not (==0) * @doc_txt_ptr: the memory pointer for allocated canonical XML text; * the caller of this functions is responsible for calling * xmlFree() to free allocated memory * * Dumps the canonized image of given XML document into memory. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * * Returns the number of bytes written on success or a negative value on fail */ int xmlC14NDocDumpMemory(xmlDocPtr doc, xmlNodeSetPtr nodes, int exclusive, xmlChar ** inclusive_ns_prefixes, int with_comments, xmlChar ** doc_txt_ptr) { int ret; xmlOutputBufferPtr buf; if (doc_txt_ptr == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocDumpMemory: null return buffer pointer\n"); #endif return (-1); } *doc_txt_ptr = NULL; /* * create memory buffer with UTF8 (default) encoding */ buf = xmlAllocOutputBuffer(NULL); if (buf == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocDumpMemory: failed to allocate output buffer.\n"); #endif return (-1); } /* * canonize document and write to buffer */ ret = xmlC14NDocSaveTo(doc, nodes, exclusive, inclusive_ns_prefixes, with_comments, buf); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocDumpMemory: xmlC14NDocSaveTo failed.\n"); #endif (void) xmlOutputBufferClose(buf); return (-1); } ret = buf->buffer->use; if (ret > 0) { *doc_txt_ptr = xmlStrndup(buf->buffer->content, ret); } (void) xmlOutputBufferClose(buf); if ((*doc_txt_ptr == NULL) && (ret > 0)) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocDumpMemory: failed to allocate memory for document text representation\n"); #endif return (-1); } return (ret); } /** * xmlC14NDocSave: * @doc: the XML document for canonization * @nodes: the nodes set to be included in the canonized image * or NULL if all document nodes should be included * @exclusive: the exclusive flag (0 - non-exclusive canonicalization; * otherwise - exclusive canonicalization) * @inclusive_ns_prefixes: the list of inclusive namespace prefixes * ended with a NULL or NULL if there is no * inclusive namespaces (only for exclusive * canonicalization, ignored otherwise) * @with_comments: include comments in the result (!=0) or not (==0) * @filename: the filename to store canonical XML image * @compression: the compression level (zlib requred): * -1 - libxml default, * 0 - uncompressed, * >0 - compression level * * Dumps the canonized image of given XML document into the file. * For details see "Canonical XML" (http://www.w3.org/TR/xml-c14n) or * "Exclusive XML Canonicalization" (http://www.w3.org/TR/xml-exc-c14n) * * Returns the number of bytes written success or a negative value on fail */ int xmlC14NDocSave(xmlDocPtr doc, xmlNodeSetPtr nodes, int exclusive, xmlChar ** inclusive_ns_prefixes, int with_comments, const char *filename, int compression) { xmlOutputBufferPtr buf; int ret; if (filename == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocSave: filename is NULL\n"); #endif return (-1); } #ifdef HAVE_ZLIB_H if (compression < 0) compression = xmlGetCompressMode(); #endif /* * save the content to a temp buffer, use default UTF8 encoding. */ buf = xmlOutputBufferCreateFilename(filename, NULL, compression); if (buf == NULL) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocSave: unable to create buffer for file=\"%s\" with compressin=%d\n", filename, compression); #endif return (-1); } /* * canonize document and write to buffer */ ret = xmlC14NDocSaveTo(doc, nodes, exclusive, inclusive_ns_prefixes, with_comments, buf); if (ret < 0) { #ifdef DEBUG_C14N xmlGenericError(xmlGenericErrorContext, "xmlC14NDocSave: xmlC14NDocSaveTo failed.\n"); #endif (void) xmlOutputBufferClose(buf); return (-1); } /* * get the numbers of bytes written */ ret = xmlOutputBufferClose(buf); return (ret); } /* * Macro used to grow the current buffer. */ #define growBufferReentrant() { \ buffer_size *= 2; \ buffer = (xmlChar *) \ xmlRealloc(buffer, buffer_size * sizeof(xmlChar)); \ if (buffer == NULL) { \ xmlC14NErrMemory("growing buffer"); \ return(NULL); \ } \ } /** * xmlC11NNormalizeString: * @input: the input string * @mode: the normalization mode (attribute, comment, PI or text) * * Converts a string to a canonical (normalized) format. The code is stolen * from xmlEncodeEntitiesReentrant(). Added normalization of \x09, \x0a, \x0A * and the @mode parameter * * Returns a normalized string (caller is responsible for calling xmlFree()) * or NULL if an error occurs */ static xmlChar * xmlC11NNormalizeString(const xmlChar * input, xmlC14NNormalizationMode mode) { const xmlChar *cur = input; xmlChar *buffer = NULL; xmlChar *out = NULL; int buffer_size = 0; if (input == NULL) return (NULL); /* * allocate an translation buffer. */ buffer_size = 1000; buffer = (xmlChar *) xmlMallocAtomic(buffer_size * sizeof(xmlChar)); if (buffer == NULL) { xmlC14NErrMemory("allocating buffer"); return (NULL); } out = buffer; while (*cur != '\0') { if ((out - buffer) > (buffer_size - 10)) { int indx = out - buffer; growBufferReentrant(); out = &buffer[indx]; } if ((*cur == '<') && ((mode == XMLC14N_NORMALIZE_ATTR) || (mode == XMLC14N_NORMALIZE_TEXT))) { *out++ = '&'; *out++ = 'l'; *out++ = 't'; *out++ = ';'; } else if ((*cur == '>') && (mode == XMLC14N_NORMALIZE_TEXT)) { *out++ = '&'; *out++ = 'g'; *out++ = 't'; *out++ = ';'; } else if ((*cur == '&') && ((mode == XMLC14N_NORMALIZE_ATTR) || (mode == XMLC14N_NORMALIZE_TEXT))) { *out++ = '&'; *out++ = 'a'; *out++ = 'm'; *out++ = 'p'; *out++ = ';'; } else if ((*cur == '"') && (mode == XMLC14N_NORMALIZE_ATTR)) { *out++ = '&'; *out++ = 'q'; *out++ = 'u'; *out++ = 'o'; *out++ = 't'; *out++ = ';'; } else if ((*cur == '\x09') && (mode == XMLC14N_NORMALIZE_ATTR)) { *out++ = '&'; *out++ = '#'; *out++ = 'x'; *out++ = '9'; *out++ = ';'; } else if ((*cur == '\x0A') && (mode == XMLC14N_NORMALIZE_ATTR)) { *out++ = '&'; *out++ = '#'; *out++ = 'x'; *out++ = 'A'; *out++ = ';'; } else if ((*cur == '\x0D') && ((mode == XMLC14N_NORMALIZE_ATTR) || (mode == XMLC14N_NORMALIZE_TEXT) || (mode == XMLC14N_NORMALIZE_COMMENT) || (mode == XMLC14N_NORMALIZE_PI))) { *out++ = '&'; *out++ = '#'; *out++ = 'x'; *out++ = 'D'; *out++ = ';'; } else { /* * Works because on UTF-8, all extended sequences cannot * result in bytes in the ASCII range. */ *out++ = *cur; } cur++; } *out++ = 0; return (buffer); } #endif /* LIBXML_OUTPUT_ENABLED */ #endif /* LIBXML_C14N_ENABLED */ 0(*[TOOLS.LIBSRC.libxml2-2_6_13]catalog.c;1+,n'./ 4-wE0123KPWO56N7p$Q~89]^_`GHJ/** * catalog.c: set of generic Catalog related routines * * Reference: SGML Open Technical Resolution TR9401:1997. * http://www.jclark.com/sp/catalog.htm * * XML Catalogs Working Draft 06 August 2001 * http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * See Copyright for the status of this software. * * Daniel.Veillard@imag.fr */ #define IN_LIBXML #include "libxml.h" #ifdef LIBXML_CATALOG_ENABLED #ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_STAT_H #include #endif #ifdef HAVE_UNISTD_H #include #endif #ifdef HAVE_FCNTL_H #include #endif #ifdef HAVE_STDLIB_H #include #endif #include #include #include #include #include #include #include #include #include #define MAX_DELEGATE 50 #define MAX_CATAL_DEPTH 50 /** * TODO: * * macro to flag unimplemented blocks * XML_CATALOG_PREFER user env to select between system/public prefered * option. C.f. Richard Tobin *> Just FYI, I am using an environment variable XML_CATALOG_PREFER with *> values "system" and "public". I have made the default be "system" to *> match yours. */ #define TODO \ xmlGenericError(xmlGenericErrorContext, \ "Unimplemented block at %s:%d\n", \ __FILE__, __LINE__); #define XML_URN_PUBID "urn:publicid:" #define XML_CATAL_BREAK ((xmlChar *) -1) #ifndef XML_XML_DEFAULT_CATALOG #define XML_XML_DEFAULT_CATALOG "file:///etc/xml/catalog" #endif #ifndef XML_SGML_DEFAULT_CATALOG #define XML_SGML_DEFAULT_CATALOG "file:///etc/sgml/catalog" #endif #if defined(_WIN32) && defined(_MSC_VER) #undef XML_XML_DEFAULT_CATALOG static char XML_XML_DEFAULT_CATALOG[256] = "file:///etc/xml/catalog"; void* __stdcall GetModuleHandleA(const char*); unsigned long __stdcall GetModuleFileNameA(void*, char*, unsigned long); #endif static xmlChar *xmlCatalogNormalizePublic(const xmlChar *pubID); static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename); /************************************************************************ * * * Types, all private * * * ************************************************************************/ typedef enum { XML_CATA_REMOVED = -1, XML_CATA_NONE = 0, XML_CATA_CATALOG, XML_CATA_BROKEN_CATALOG, XML_CATA_NEXT_CATALOG, XML_CATA_PUBLIC, XML_CATA_SYSTEM, XML_CATA_REWRITE_SYSTEM, XML_CATA_DELEGATE_PUBLIC, XML_CATA_DELEGATE_SYSTEM, XML_CATA_URI, XML_CATA_REWRITE_URI, XML_CATA_DELEGATE_URI, SGML_CATA_SYSTEM, SGML_CATA_PUBLIC, SGML_CATA_ENTITY, SGML_CATA_PENTITY, SGML_CATA_DOCTYPE, SGML_CATA_LINKTYPE, SGML_CATA_NOTATION, SGML_CATA_DELEGATE, SGML_CATA_BASE, SGML_CATA_CATALOG, SGML_CATA_DOCUMENT, SGML_CATA_SGMLDECL } xmlCatalogEntryType; typedef struct _xmlCatalogEntry xmlCatalogEntry; typedef xmlCatalogEntry *xmlCatalogEntryPtr; struct _xmlCatalogEntry { struct _xmlCatalogEntry *next; struct _xmlCatalogEntry *parent; struct _xmlCatalogEntry *children; xmlCatalogEntryType type; xmlChar *name; xmlChar *value; xmlChar *URL; /* The expanded URL using the base */ xmlCatalogPrefer prefer; int dealloc; int depth; }; typedef enum { XML_XML_CATALOG_TYPE = 1, XML_SGML_CATALOG_TYPE } xmlCatalogType; #define XML_MAX_SGML_CATA_DEPTH 10 struct _xmlCatalog { xmlCatalogType type; /* either XML or SGML */ /* * SGML Catalogs are stored as a simple hash table of catalog entries * Catalog stack to check against overflows when building the * SGML catalog */ char *catalTab[XML_MAX_SGML_CATA_DEPTH]; /* stack of catals */ int catalNr; /* Number of current catal streams */ int catalMax; /* Max number of catal streams */ xmlHashTablePtr sgml; /* * XML Catalogs are stored as a tree of Catalog entries */ xmlCatalogPrefer prefer; xmlCatalogEntryPtr xml; }; /************************************************************************ * * * Global variables * * * ************************************************************************/ /* * Those are preferences */ static int xmlDebugCatalogs = 0; /* used for debugging */ static xmlCatalogAllow xmlCatalogDefaultAllow = XML_CATA_ALLOW_ALL; static xmlCatalogPrefer xmlCatalogDefaultPrefer = XML_CATA_PREFER_PUBLIC; /* * Hash table containing all the trees of XML catalogs parsed by * the application. */ static xmlHashTablePtr xmlCatalogXMLFiles = NULL; /* * The default catalog in use by the application */ static xmlCatalogPtr xmlDefaultCatalog = NULL; /* * A mutex for modifying the shared global catalog(s) * xmlDefaultCatalog tree. * It also protects xmlCatalogXMLFiles * The core of this readers/writer scheme is in xmlFetchXMLCatalogFile() */ static xmlRMutexPtr xmlCatalogMutex = NULL; /* * Whether the catalog support was initialized. */ static int xmlCatalogInitialized = 0; /************************************************************************ * * * Catalog error handlers * * * ************************************************************************/ /** * xmlCatalogErrMemory: * @extra: extra informations * * Handle an out of memory condition */ static void xmlCatalogErrMemory(const char *extra) { __xmlRaiseError(NULL, NULL, NULL, NULL, NULL, XML_FROM_CATALOG, XML_ERR_NO_MEMORY, XML_ERR_ERROR, NULL, 0, extra, NULL, NULL, 0, 0, "Memory allocation failed : %s\n", extra); } /** * xmlCatalogErr: * @catal: the Catalog entry * @node: the context node * @msg: the error message * @extra: extra informations * * Handle a catalog error */ static void xmlCatalogErr(xmlCatalogEntryPtr catal, xmlNodePtr node, int error, const char *msg, const xmlChar *str1, const xmlChar *str2, const xmlChar *str3) { __xmlRaiseError(NULL, NULL, NULL, catal, node, XML_FROM_CATALOG, error, XML_ERR_ERROR, NULL, 0, (const char *) str1, (const char *) str2, (const char *) str3, 0, 0, msg, str1, str2, str3); } /************************************************************************ * * * Allocation and Freeing * * * ************************************************************************/ /** * xmlNewCatalogEntry: * @type: type of entry * @name: name of the entry * @value: value of the entry * @prefer: the PUBLIC vs. SYSTEM current preference value * * create a new Catalog entry, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. * * Returns the xmlCatalogEntryPtr or NULL in case of error */ static xmlCatalogEntryPtr xmlNewCatalogEntry(xmlCatalogEntryType type, const xmlChar *name, const xmlChar *value, const xmlChar *URL, xmlCatalogPrefer prefer) { xmlCatalogEntryPtr ret;  KY~LIBXML2-2_6_13.bckn'wE([TOOLS.LIBSRC.libxml2-2_6_13]catalog.c;1Q| xmlChar *normid = NULL; ret = (xmlCatalogEntryPtr) xmlMalloc(sizeof(xmlCatalogEntry)); if (ret == NULL) { xmlCatalogErrMemory("allocating catalog entry"); return(NULL); } ret->next = NULL; ret->parent = NULL; ret->children = NULL; ret->type = type; if (type == XML_CATA_PUBLIC || type == XML_CATA_DELEGATE_PUBLIC) { normid = xmlCatalogNormalizePublic(name); if (normid != NULL) name = (*normid != 0 ? normid : NULL); } if (name != NULL) ret->name = xmlStrdup(name); else ret->name = NULL; if (normid != NULL) xmlFree(normid); if (value != NULL) ret->value = xmlStrdup(value); else ret->value = NULL; if (URL == NULL) URL = value; if (URL != NULL) ret->URL = xmlStrdup(URL); else ret->URL = NULL; ret->prefer = prefer; ret->dealloc = 0; ret->depth = 0; return(ret); } static void xmlFreeCatalogEntryList(xmlCatalogEntryPtr ret); /** * xmlFreeCatalogEntry: * @ret: a Catalog entry * * Free the memory allocated to a Catalog entry */ static void xmlFreeCatalogEntry(xmlCatalogEntryPtr ret) { if (ret == NULL) return; /* * Entries stored in the file hash must be deallocated * only by the file hash cleaner ! */ if (ret->dealloc == 1) return; if (xmlDebugCatalogs) { if (ret->name != NULL) xmlGenericError(xmlGenericErrorContext, "Free catalog entry %s\n", ret->name); else if (ret->value != NULL) xmlGenericError(xmlGenericErrorContext, "Free catalog entry %s\n", ret->value); else xmlGenericError(xmlGenericErrorContext, "Free catalog entry\n"); } if (ret->name != NULL) xmlFree(ret->name); if (ret->value != NULL) xmlFree(ret->value); if (ret->URL != NULL) xmlFree(ret->URL); xmlFree(ret); } /** * xmlFreeCatalogEntryList: * @ret: a Catalog entry list * * Free the memory allocated to a full chained list of Catalog entries */ static void xmlFreeCatalogEntryList(xmlCatalogEntryPtr ret) { xmlCatalogEntryPtr next; while (ret != NULL) { next = ret->next; xmlFreeCatalogEntry(ret); ret = next; } } /** * xmlFreeCatalogHashEntryList: * @ret: a Catalog entry list * * Free the memory allocated to list of Catalog entries from the * catalog file hash. */ static void xmlFreeCatalogHashEntryList(xmlCatalogEntryPtr catal) { xmlCatalogEntryPtr children, next; if (catal == NULL) return; children = catal->children; while (children != NULL) { next = children->next; children->dealloc = 0; children->children = NULL; xmlFreeCatalogEntry(children); children = next; } catal->dealloc = 0; xmlFreeCatalogEntry(catal); } /** * xmlCreateNewCatalog: * @type: type of catalog * @prefer: the PUBLIC vs. SYSTEM current preference value * * create a new Catalog, this type is shared both by XML and * SGML catalogs, but the acceptable types values differs. * * Returns the xmlCatalogPtr or NULL in case of error */ static xmlCatalogPtr xmlCreateNewCatalog(xmlCatalogType type, xmlCatalogPrefer prefer) { xmlCatalogPtr ret; ret = (xmlCatalogPtr) xmlMalloc(sizeof(xmlCatalog)); if (ret == NULL) { xmlCatalogErrMemory("allocating catalog"); return(NULL); } memset(ret, 0, sizeof(xmlCatalog)); ret->type = type; ret->catalNr = 0; ret->catalMax = XML_MAX_SGML_CATA_DEPTH; ret->prefer = prefer; if (ret->type == XML_SGML_CATALOG_TYPE) ret->sgml = xmlHashCreate(10); return(ret); } /** * xmlFreeCatalog: * @catal: a Catalog * * Free the memory allocated to a Catalog */ void xmlFreeCatalog(xmlCatalogPtr catal) { if (catal == NULL) return; if (catal->xml != NULL) xmlFreeCatalogEntryList(catal->xml); if (catal->sgml != NULL) xmlHashFree(catal->sgml, (xmlHashDeallocator) xmlFreeCatalogEntry); xmlFree(catal); } /************************************************************************ * * * Serializing Catalogs * * * ************************************************************************/ #ifdef LIBXML_OUTPUT_ENABLED /** * xmlCatalogDumpEntry: * @entry: the catalog entry * @out: the file. * * Serialize an SGML Catalog entry */ static void xmlCatalogDumpEntry(xmlCatalogEntryPtr entry, FILE *out) { if ((entry == NULL) || (out == NULL)) return; switch (entry->type) { case SGML_CATA_ENTITY: fprintf(out, "ENTITY "); break; case SGML_CATA_PENTITY: fprintf(out, "ENTITY %%"); break; case SGML_CATA_DOCTYPE: fprintf(out, "DOCTYPE "); break; case SGML_CATA_LINKTYPE: fprintf(out, "LINKTYPE "); break; case SGML_CATA_NOTATION: fprintf(out, "NOTATION "); break; case SGML_CATA_PUBLIC: fprintf(out, "PUBLIC "); break; case SGML_CATA_SYSTEM: fprintf(out, "SYSTEM "); break; case SGML_CATA_DELEGATE: fprintf(out, "DELEGATE "); break; case SGML_CATA_BASE: fprintf(out, "BASE "); break; case SGML_CATA_CATALOG: fprintf(out, "CATALOG "); break; case SGML_CATA_DOCUMENT: fprintf(out, "DOCUMENT "); break; case SGML_CATA_SGMLDECL: fprintf(out, "SGMLDECL "); break; default: return; } switch (entry->type) { case SGML_CATA_ENTITY: case SGML_CATA_PENTITY: case SGML_CATA_DOCTYPE: case SGML_CATA_LINKTYPE: case SGML_CATA_NOTATION: fprintf(out, "%s", (const char *) entry->name); break; case SGML_CATA_PUBLIC: case SGML_CATA_SYSTEM: case SGML_CATA_SGMLDECL: case SGML_CATA_DOCUMENT: case SGML_CATA_CATALOG: case SGML_CATA_BASE: case SGML_CATA_DELEGATE: fprintf(out, "\"%s\"", entry->name); break; default: break; } switch (entry->type) { case SGML_CATA_ENTITY: case SGML_CATA_PENTITY: case SGML_CATA_DOCTYPE: case SGML_CATA_LINKTYPE: case SGML_CATA_NOTATION: case SGML_CATA_PUBLIC: case SGML_CATA_SYSTEM: case SGML_CATA_DELEGATE: fprintf(out, " \"%s\"", entry->value); break; default: break; } fprintf(out, "\n"); } static int xmlDumpXMLCatalog(FILE *out, xmlCatalogEntryPtr catal) { int ret; xmlDocPtr doc; xmlNsPtr ns; xmlDtdPtr dtd; xmlNodePtr node, catalog; xmlOutputBufferPtr buf; xmlCatalogEntryPtr cur; /* * Rebuild a catalog */ doc = xmlNewDoc(NULL); if (doc == NULL) return(-1); dtd = xmlNewDtd(doc, BAD_CAST "catalog", BAD_CAST "-//OASIS//DTD Entity Resolution XML Catalog V1.0//EN", BAD_CAST "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"); xmlAddChild((xmlNodePtr) doc, (xmlNodePtr) dtd); ns = xmlNewNs(NULL, XML_CATALOGS_NAMESPACE, NULL); if (ns == NULL) { xmlFreeDoc(doc); return(-1); } catalog = xmlNewDocNode(doc, ns, BAD_CAST "catalog", NULL); if (catalog == NULL) { xmlFreeNs(ns); xmlFreeDoc(doc); return(-1); } catalog->nsDef = ns; xmlAddChild((xmlNodePtr) doc, catalog); /* * add all the catalog entries */ cur = catal; while (cur != NULL) { switch (cur->type) { case XML_CATA_REMOVED: break; case XML_CATA_BROKEN_CATALOG: case XML_CATA_CATALOG: if (cur == catal) { cur = cur->children; continue; } break; case XML_CATA_NEXT_CATALOG: node = xmlNewDocNode(doc, ns, BAD_CAST "nextCatalog", NULL); xmlSetProp(node, BAD_CAST "catalog", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_NONE: break; case XML_CATA_PUBLIC: node = xmlNewDocNode(doc, ns, BAD_CAST "public", NULL); xmlSetProp(node, BAD_CAST "publicId", cur->name); xmlSetProp(node, BAD_CAST "uri", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_SYSTEM: node = xmlNewDocNode(doc, ns, BAD_CAST "system", NULL); xmlSetProp(node, BAD_CAST "systemId", cur->name); xmlSetProp(node, BAD_CAST "uri", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_REWRITE_SYSTEM: node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteSystem", NULL); xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_DELEGATE_PUBLIC: node = xmlNewDocNode(doc, ns, BAD_CAST "delegatePublic", NULL); xmlSetProp(node, BAD_CAST "publicIdStartString", cur->name); xmlSetProp(node, BAD_CAST "catalog", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_DELEGATE_SYSTEM: node = xmlNewDocNode(doc, ns, BAD_CAST "delegateSystem", NULL); xmlSetProp(node, BAD_CAST "systemIdStartString", cur->name); xmlSetProp(node, BAD_CAST "catalog", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_URI: node = xmlNewDocNode(doc, ns, BAD_CAST "uri", NULL); xmlSetProp(node, BAD_CAST "name", cur->name); xmlSetProp(node, BAD_CAST "uri", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_REWRITE_URI: node = xmlNewDocNode(doc, ns, BAD_CAST "rewriteURI", NULL); xmlSetProp(node, BAD_CAST "uriStartString", cur->name); xmlSetProp(node, BAD_CAST "rewritePrefix", cur->value); xmlAddChild(catalog, node); break; case XML_CATA_DELEGATE_URI: node = xmlNewDocNode(doc, ns, BAD_CAST "delegateURI", NULL); xmlSetProp(node, BAD_CAST "uriStartString", cur->name); xmlSetProp(node, BAD_CAST "catalog", cur->value); xmlAddChild(catalog, node); break; case SGML_CATA_SYSTEM: case SGML_CATA_PUBLIC: case SGML_CATA_ENTITY: case SGML_CATA_PENTITY: case SGML_CATA_DOCTYPE: case SGML_CATA_LINKTYPE: case SGML_CATA_NOTATION: case SGML_CATA_DELEGATE: case SGML_CATA_BASE: case SGML_CATA_CATALOG: case SGML_CATA_DOCUMENT: case SGML_CATA_SGMLDECL: break; } cur = cur->next; } /* * reserialize it */ buf = xmlOutputBufferCreateFile(out, NULL); if (buf == NULL) { xmlFreeDoc(doc); return(-1); } ret = xmlSaveFormatFileTo(buf, doc, NULL, 1); /* * Free it */ xmlFreeDoc(doc); return(ret); } #endif /* LIBXML_OUTPUT_ENABLED */ /************************************************************************ * * * Converting SGML Catalogs to XML * * * ************************************************************************/ /** * xmlCatalogConvertEntry: * @entry: the entry * @catal: pointer to the catalog being converted * * Convert one entry from the catalog */ static void xmlCatalogConvertEntry(xmlCatalogEntryPtr entry, xmlCatalogPtr catal) { if ((entry == NULL) || (catal == NULL) || (catal->sgml == NULL) || (catal->xml == NULL)) return; switch (entry->type) { case SGML_CATA_ENTITY: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_PENTITY: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_DOCTYPE: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_LINKTYPE: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_NOTATION: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_PUBLIC: entry->type = XML_CATA_PUBLIC; break; case SGML_CATA_SYSTEM: entry->type = XML_CATA_SYSTEM; break; case SGML_CATA_DELEGATE: entry->type = XML_CATA_DELEGATE_PUBLIC; break; case SGML_CATA_CATALOG: entry->type = XML_CATA_CATALOG; break; default: xmlHashRemoveEntry(catal->sgml, entry->name, (xmlHashDeallocator) xmlFreeCatalogEntry); return; } /* * Conversion successful, remove from the SGML catalog * and add it to the default XML one */ xmlHashRemoveEntry(catal->sgml, entry->name, NULL); entry->parent = catal->xml; entry->next = NULL; if (catal->xml->children == NULL) catal->xml->children = entry; else { xmlCatalogEntryPtr prev; prev = catal->xml->children; while (prev->next != NULL) prev = prev->next; prev->next = entry; } } /** * xmlConvertSGMLCatalog: * @catal: the catalog * * Convert all the SGML catalog entries as XML ones * * Returns the number of entries converted if successful, -1 otherwise */ int xmlConvertSGMLCatalog(xmlCatalogPtr catal) { if ((catal == NULL) || (catal->type != XML_SGML_CATALOG_TYPE)) return(-1); if (xmlDebugCatalogs) { xmlGenericError(xmlGenericErrorContext, "Converting SGML catalog to XML\n"); } xmlHashScan(catal->sgml, (xmlHashScanner) xmlCatalogConvertEntry, &catal); return(0); } /************************************************************************ * * * Helper function * * * ************************************************************************/ /** * xmlCatalogUnWrapURN: * @urn: an "urn:publicid:" to unwrap * * Expand the URN into the equivalent Public Identifier * * Returns the new identifier or NULL, the string must be deallocated * by the caller. */ static xmlChar * xmlCatalogUnWrapURN(const xmlChar *urn) { xmlChar result[2000]; unsigned int i = 0; if (xmlStrncmp(urn, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) return(NULL); urn += sizeof(XML_URN_PUBID) - 1; while (*urn != 0) { if (i > sizeof(result) - 4) break; if (*urn == '+') { result[i++] = ' '; urn++; } else if (*urn == ':') { result[i++] = '/'; result[i++] = '/'; urn++; } else if (*urn == ';') { result[i++] = ':'; result[i++] = ':'; urn++; } else if (*urn == '%') { if ((urn[1] == '2') && (urn[2] == 'B')) result[i++] = '+'; else if ((urn[1] == '3') && (urn[2] == 'A')) result[i++] = ':'; else if ((urn[1] == '2') && (urn[2] == 'F')) result[i++] = '/'; else if ((urn[1] == '3') && (urn[2] == 'B')) result[i++] = ';'; else if ((urn[1] == '2') && (urn[2] == '7')) result[i++] = '\''; else if ((urn[1] == '3') && (urn[2] == 'F')) result[i++] = '?'; else if ((urn[1] == '2') && (urn[2] == '3')) result[i++] = '#'; else if ((urn[1] == '2') && (urn[2] == '5')) result[i++] = '%'; else { result[i++] = *urn; urn++; continue; } urn += 3; } else { result[i++] = *urn; urn++; } } result[i] = 0; return(xmlStrdup(result)); } /** * xmlParseCatalogFile: * @filename: the filename * * parse an XML file and build a tree. It's like xmlParseFile() * except it bypass all catalog lookups. * * Returns the resulting document tree or NULL in case of error */ xmlDocPtr xmlParseCatalogFile(const char *filename) { xmlDocPtr ret; xmlParserCtxtPtr ctxt; char *directory = NULL; xmlParserInputPtr inputStream; xmlParserInputBufferPtr buf; ctxt = xmlNewParserCtxt(); if (ctxt == NULL) { if (xmlDefaultSAXHandler.error != NULL) { xmlDefaultSAXHandler.error(NULL, "out of memory\n"); } return(NULL); } buf = xmlParserInputBufferCreateFilename(filename, XML_CHAR_ENCODING_NONE); if (buf == NULL) { xmlFreeParserCtxt(ctxt); return(NULL); } inputStream = xmlNewInputStream(ctxt); if (inputStream == NULL) { xmlFreeParserCtxt(ctxt); return(NULL); } inputStream->filename = (char *) xmlCanonicPath((const xmlChar *)filename); inputStream->buf = buf; inputStream->base = inputStream->buf->buffer->content; inputStream->cur = inputStream->buf->buffer->content; inputStream->end = &inputStream->buf->buffer->content[inputStream->buf->buffer->use]; inputPush(ctxt, inputStream); if ((ctxt->directory == NULL) && (directory == NULL)) directory = xmlParserGetDirectory(filename); if ((ctxt->directory == NULL) && (directory != NULL)) ctxt->directory = directory; ctxt->valid = 0; ctxt->validate = 0; ctxt->loadsubset = 0; ctxt->pedantic = 0; xmlParseDocument(ctxt); if (ctxt->wellFormed) ret = ctxt->myDoc; else { ret = NULL; xmlFreeDoc(ctxt->myDoc); ctxt->myDoc = NULL; } xmlFreeParserCtxt(ctxt); return(ret); } /** * xmlLoadFileContent: * @filename: a file path * * Load a file content into memory. * * Returns a pointer to the 0 terminated string or NULL in case of error */ static xmlChar * xmlLoadFileContent(const char *filename) { #ifdef HAVE_STAT int fd; #else FILE *fd; #endif int len; long size; #ifdef HAVE_STAT struct stat info; #endif xmlChar *content; if (filename == NULL) return (NULL); #ifdef HAVE_STAT if (stat(filename, &info) < 0) return (NULL); #endif #ifdef HAVE_STAT if ((fd = open(filename, O_RDONLY)) < 0) #else if ((fd = fopen(filename, "rb")) == NULL) #endif { return (NULL); } #ifdef HAVE_STAT size = info.st_size; #else if (fseek(fd, 0, SEEK_END) || (size = ftell(fd)) == EOF || fseek(fd, 0, SEEK_SET)) { /* File operations denied? ok, just close and return failure */ fclose(fd); return (NULL); } #endif content = xmlMallocAtomic(size + 10); if (content == NULL) { xmlCatalogErrMemory("allocating catalog data"); return (NULL); } #ifdef HAVE_STAT len = read(fd, content, size); #else len = fread(content, 1, size, fd); #endif if (len < 0) { xmlFree(content); return (NULL); } #ifdef HAVE_STAT close(fd); #else fclose(fd); #endif content[len] = 0; return(content); } /** * xmlCatalogNormalizePublic: * @pubID: the public ID string * * Normalizes the Public Identifier * * Implements 6.2. Public Identifier Normalization * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Returns the new string or NULL, the string must be deallocated * by the caller. */ static xmlChar * xmlCatalogNormalizePublic(const xmlChar *pubID) { int ok = 1; int white; const xmlChar *p; xmlChar *ret; xmlChar *q; if (pubID == NULL) return(NULL); white = 1; for (p = pubID;*p != 0 && ok;p++) { if (!xmlIsBlank_ch(*p)) white = 0; else if (*p == 0x20 && !white) white = 1; else ok = 0; } if (ok && !white) /* is normalized */ return(NULL); ret = xmlStrdup(pubID); q = ret; white = 0; for (p = pubID;*p != 0;p++) { if (xmlIsBlank_ch(*p)) { if (q != ret) white = 1; } else { if (white) { *(q++) = 0x20; white = 0; } *(q++) = *p; } } *q = 0; return(ret); } /************************************************************************ * * * The XML Catalog parser * * * ************************************************************************/ static xmlCatalogEntryPtr xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename); static void xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, xmlCatalogEntryPtr parent); static xmlChar * xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, const xmlChar *sysID); static xmlChar * xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI); /** * xmlGetXMLCatalogEntryType: * @name: the name * * lookup the internal type associated to an XML catalog entry name * * Returns the type associated with that name */ static xmlCatalogEntryType xmlGetXMLCatalogEntryType(const xmlChar *name) { xmlCatalogEntryType type = XML_CATA_NONE; if (xmlStrEqual(name, (const xmlChar *) "system")) type = XML_CATA_SYSTEM; else if (xmlStrEqual(name, (const xmlChar *) "public")) type = XML_CATA_PUBLIC; else if (xmlStrEqual(name, (const xmlChar *) "rewriteSystem")) type = XML_CATA_REWRITE_SYSTEM; else if (xmlStrEqual(name, (const xmlChar *) "delegatePublic")) type = XML_CATA_DELEGATE_PUBLIC; else if (xmlStrEqual(name, (const xmlChar *) "delegateSystem")) type = XML_CATA_DELEGATE_SYSTEM; else if (xmlStrEqual(name, (const xmlChar *) "uri")) type = XML_CATA_URI; else if (xmlStrEqual(name, (const xmlChar *) "rewriteURI")) type = XML_CATA_REWRITE_URI; else if (xmlStrEqual(name, (const xmlChar *) "delegateURI")) type = XML_CATA_DELEGATE_URI; else if (xmlStrEqual(name, (const xmlChar *) "nextCatalog")) type = XML_CATA_NEXT_CATALOG; else if (xmlStrEqual(name, (const xmlChar *) "catalog")) type = XML_CATA_CATALOG; return(type); } /** * xmlParseXMLCatalogOneNode: * @cur: the XML node * @type: the type of Catalog entry * @name: the name of the node * @attrName: the attribute holding the value * @uriAttrName: the attribute holding the URI-Reference * @prefer: the PUBLIC vs. SYSTEM current preference value * * Finishes the examination of an XML tree node of a catalog and build * a Catalog entry from it. * * Returns the new Catalog entry node or NULL in case of error. */ static xmlCatalogEntryPtr xmlParseXMLCatalogOneNode(xmlNodePtr cur, xmlCatalogEntryType type, const xmlChar *name, const xmlChar *attrName, const xmlChar *uriAttrName, xmlCatalogPrefer prefer) { int ok = 1; xmlChar *uriValue; xmlChar *nameValue = NULL; xmlChar *base = NULL; xmlChar *URL = NULL; xmlCatalogEntryPtr ret = NULL; if (attrName != NULL) { nameValue = xmlGetProp(cur, attrName); if (nameValue == NULL) { xmlCatalogErr(ret, cur, XML_CATALOG_MISSING_ATTR, "%s entry lacks '%s'\n", name, attrName, NULL); ok = 0; } } uriValue = xmlGetProp(cur, uriAttrName); if (uriValue == NULL) { xmlCatalogErr(ret, cur, XML_CATALOG_MISSING_ATTR, "%s entry lacks '%s'\n", name, uriAttrName, NULL); ok = 0; } if (!ok) { if (nameValue != NULL) xmlFree(nameValue); if (uriValue != NULL) xmlFree(uriValue); return(NULL); } base = xmlNodeGetBase(cur->doc, cur); URL = xmlBuildURI(uriValue, base); if (URL != NULL) { if (xmlDebugCatalogs > 1) { if (nameValue != NULL) xmlGenericError(xmlGenericErrorContext, "Found %s: '%s' '%s'\n", name, nameValue, URL); else xmlGenericError(xmlGenericErrorContext, "Found %s: '%s'\n", name, URL); } ret = xmlNewCatalogEntry(type, nameValue, uriValue, URL, prefer); } else { xmlCatalogErr(ret, cur, XML_CATALOG_ENTRY_BROKEN, "%s entry '%s' broken ?: %s\n", name, uriAttrName, uriValue); } if (nameValue != NULL) xmlFree(nameValue); if (uriValue != NULL) xmlFree(uriValue); if (base != NULL) xmlFree(base); if (URL != NULL) xmlFree(URL); return(ret); } /** * xmlParseXMLCatalogNode: * @cur: the XML node * @prefer: the PUBLIC vs. SYSTEM current preference value * @parent: the parent Catalog entry * * Examines an XML tree node of a catalog and build * a Catalog entry from it adding it to its parent. The examination can * be recursive. */ static void xmlParseXMLCatalogNode(xmlNodePtr cur, xmlCatalogPrefer prefer, xmlCatalogEntryPtr parent) { xmlChar *uri = NULL; xmlChar *URL = NULL; xmlChar *base = NULL; xmlCatalogEntryPtr entry = NULL; if (cur == NULL) return; if (xmlStrEqual(cur->name, BAD_CAST "group")) { xmlChar *prop; prop = xmlGetProp(cur, BAD_CAST "prefer"); if (prop != NULL) { if (xmlStrEqual(prop, BAD_CAST "system")) { prefer = XML_CATA_PREFER_SYSTEM; } else if (xmlStrEqual(prop, BAD_CAST "public")) { prefer = XML_CATA_PREFER_PUBLIC; } else { xmlCatalogErr(parent, cur, XML_CATALOG_PREFER_VALUE, "Invalid value for prefer: '%s'\n", prop, NULL, NULL); } xmlFree(prop); } /* * Recurse to propagate prefer to the subtree * (xml:base handling is automated) */ xmlParseXMLCatalogNodeList(cur->children, prefer, parent); } else if (xmlStrEqual(cur->name, BAD_CAST "public")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_PUBLIC, BAD_CAST "public", BAD_CAST "publicId", BAD_CAST "uri", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "system")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_SYSTEM, BAD_CAST "system", BAD_CAST "systemId", BAD_CAST "uri", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteSystem")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_SYSTEM, BAD_CAST "rewriteSystem", BAD_CAST "systemIdStartString", BAD_CAST "rewritePrefix", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "delegatePublic")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_PUBLIC, BAD_CAST "delegatePublic", BAD_CAST "publicIdStartString", BAD_CAST "catalog", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "delegateSystem")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_SYSTEM, BAD_CAST "delegateSystem", BAD_CAST "systemIdStartString", BAD_CAST "catalog", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "uri")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_URI, BAD_CAST "uri", BAD_CAST "name", BAD_CAST "uri", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "rewriteURI")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_REWRITE_URI, BAD_CAST "rewriteURI", BAD_CAST "uriStartString", BAD_CAST "rewritePrefix", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "delegateURI")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_DELEGATE_URI, BAD_CAST "delegateURI", BAD_CAST "uriStartString", BAD_CAST "catalog", prefer); } else if (xmlStrEqual(cur->name, BAD_CAST "nextCatalog")) { entry = xmlParseXMLCatalogOneNode(cur, XML_CATA_NEXT_CATALOG, BAD_CAST "nextCatalog", NULL, BAD_CAST "catalog", prefer); } if ((entry != NULL) && (parent != NULL)) { entry->parent = parent; if (parent->children == NULL) parent->children = entry; else { xmlCatalogEntryPtr prev; prev = parent->children; while (prev->next != NULL) prev = prev->next; prev->next = entry; } } if (base != NULL) xmlFree(base); if (uri != NULL) xmlFree(uri); if (URL != NULL) xmlFree(URL); } /** * xmlParseXMLCatalogNodeList: * @cur: the XML node list of siblings * @prefer: the PUBLIC vs. SYSTEM current preference value * @parent: the parent Catalog entry * * Examines a list of XML sibling nodes of a catalog and build * a list of Catalog entry from it adding it to the parent. * The examination will recurse to examine node subtrees. */ static void xmlParseXMLCatalogNodeList(xmlNodePtr cur, xmlCatalogPrefer prefer, xmlCatalogEntryPtr parent) { while (cur != NULL) { if ((cur->ns != NULL) && (cur->ns->href != NULL) && (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) { xmlParseXMLCatalogNode(cur, prefer, parent); } cur = cur->next; } /* TODO: sort the list according to REWRITE lengths and prefer value */ } /** * xmlParseXMLCatalogFile: * @prefer: the PUBLIC vs. SYSTEM current preference value * @filename: the filename for the catalog * * Parses the catalog file to extract the XML tree and then analyze the * tree to build a list of Catalog entries corresponding to this catalog * * Returns the resulting Catalog entries list */ static xmlCatalogEntryPtr xmlParseXMLCatalogFile(xmlCatalogPrefer prefer, const xmlChar *filename) { xmlDocPtr doc; xmlNodePtr cur; xmlChar *prop; xmlCatalogEntryPtr parent = NULL; if (filename == NULL) return(NULL); doc = xmlParseCatalogFile((const char *) filename); if (doc == NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Failed to parse catalog %s\n", filename); return(NULL); } if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "%d Parsing catalog %s\n", xmlGetThreadId(), filename); cur = xmlDocGetRootElement(doc); if ((cur != NULL) && (xmlStrEqual(cur->name, BAD_CAST "catalog")) && (cur->ns != NULL) && (cur->ns->href != NULL) && (xmlStrEqual(cur->ns->href, XML_CATALOGS_NAMESPACE))) { parent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, (const xmlChar *)filename, NULL, prefer); if (parent == NULL) { xmlFreeDoc(doc); return(NULL); } prop = xmlGetProp(cur, BAD_CAST "prefer"); if (prop != NULL) { if (xmlStrEqual(prop, BAD_CAST "system")) { prefer = XML_CATA_PREFER_SYSTEM; } else if (xmlStrEqual(prop, BAD_CAST "public")) { prefer = XML_CATA_PREFER_PUBLIC; } else { xmlCatalogErr(NULL, cur, XML_CATALOG_PREFER_VALUE, "Invalid value for prefer: '%s'\n", prop, NULL, NULL); } xmlFree(prop); } cur = cur->children; xmlParseXMLCatalogNodeList(cur, prefer, parent); } else { xmlCatalogErr(NULL, (xmlNodePtr) doc, XML_CATALOG_NOT_CATALOG, "File %s is not an XML Catalog\n", filename, NULL, NULL); xmlFreeDoc(doc); return(NULL); } xmlFreeDoc(doc); return(parent); } /** * xmlFetchXMLCatalogFile: * @catal: an existing but incomplete catalog entry * * Fetch and parse the subcatalog referenced by an entry * * Returns 0 in case of success, -1 otherwise */ static int xmlFetchXMLCatalogFile(xmlCatalogEntryPtr catal) { xmlCatalogEntryPtr doc; if (catal == NULL) return(-1); if (catal->URL == NULL) return(-1); if (catal->children != NULL) return(-1); /* * lock the whole catalog for modification */ xmlRMutexLock(xmlCatalogMutex); if (catal->children != NULL) { /* Okay someone else did it in the meantime */ xmlRMutexUnlock(xmlCatalogMutex); return(0); } if (xmlCatalogXMLFiles != NULL) { doc = (xmlCatalogEntryPtr) xmlHashLookup(xmlCatalogXMLFiles, catal->URL); if (doc != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Found %s in file hash\n", catal->URL); if (catal->type == XML_CATA_CATALOG) catal->children = doc->children; else catal->children = doc; catal->dealloc = 0; xmlRMutexUnlock(xmlCatalogMutex); return(0); } if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "%s not found in file hash\n", catal->URL); } /* * Fetch and parse. Note that xmlParseXMLCatalogFile does not * use the existing catalog, there is no recursion allowed at * that level. */ doc = xmlParseXMLCatalogFile(catal->prefer, catal->URL); if (doc == NULL) { catal->type = XML_CATA_BROKEN_CATALOG; xmlRMutexUnlock(xmlCatalogMutex); return(-1); } if (catal->type == XML_CATA_CATALOG) catal->children = doc->children; else catal->children = doc; doc->dealloc = 1; if (xmlCatalogXMLFiles == NULL) xmlCatalogXMLFiles = xmlHashCreate(10); if (xmlCatalogXMLFiles != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "%s added to file hash\n", catal->URL); xmlHashAddEntry(xmlCatalogXMLFiles, catal->URL, doc); } xmlRMutexUnlock(xmlCatalogMutex); return(0); } /************************************************************************ * * * XML Catalog handling * * * ************************************************************************/ /** * xmlAddXMLCatalog: * @catal: top of an XML catalog * @type: the type of record to add to the catalog * @orig: the system, public or prefix to match (or NULL) * @replace: the replacement value for the match * * Add an entry in the XML catalog, it may overwrite existing but * different entries. * * Returns 0 if successful, -1 otherwise */ static int xmlAddXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *type, const xmlChar *orig, const xmlChar *replace) { xmlCatalogEntryPtr cur; xmlCatalogEntryType typ; int doregister = 0; if ((catal == NULL) || ((catal->type != XML_CATA_CATALOG)  3oS~LIBXML2-2_6_13.bckn'wE([TOOLS.LIBSRC.libxml2-2_6_13]catalog.c;1 ]|M&& (catal->type != XML_CATA_BROKEN_CATALOG))) return(-1); if (catal->children == NULL) { xmlFetchXMLCatalogFile(catal); } if (catal->children == NULL) doregister = 1; typ = xmlGetXMLCatalogEntryType(type); if (typ == XML_CATA_NONE) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Failed to add unknown element %s to catalog\n", type); return(-1); } cur = catal->children; /* * Might be a simple "update in place" */ if (cur != NULL) { while (cur != NULL) { if ((orig != NULL) && (cur->type == typ) && (xmlStrEqual(orig, cur->name))) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Updating element %s to catalog\n", type); if (cur->value != NULL) xmlFree(cur->value); if (cur->URL != NULL) xmlFree(cur->URL); cur->value = xmlStrdup(replace); cur->URL = xmlStrdup(replace); return(0); } if (cur->next == NULL) break; cur = cur->next; } } if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Adding element %s to catalog\n", type); if (cur == NULL) catal->children = xmlNewCatalogEntry(typ, orig, replace, NULL, catal->prefer); else cur->next = xmlNewCatalogEntry(typ, orig, replace, NULL, catal->prefer); if (doregister) { cur = xmlHashLookup(xmlCatalogXMLFiles, catal->URL); if (cur != NULL) cur->children = catal->children; } return(0); } /** * xmlDelXMLCatalog: * @catal: top of an XML catalog * @value: the value to remove from the catalog * * Remove entries in the XML catalog where the value or the URI * is equal to @value * * Returns the number of entries removed if successful, -1 otherwise */ static int xmlDelXMLCatalog(xmlCatalogEntryPtr catal, const xmlChar *value) { xmlCatalogEntryPtr cur; int ret = 0; if ((catal == NULL) || ((catal->type != XML_CATA_CATALOG) && (catal->type != XML_CATA_BROKEN_CATALOG))) return(-1); if (value == NULL) return(-1); if (catal->children == NULL) { xmlFetchXMLCatalogFile(catal); } /* * Scan the children */ cur = catal->children; while (cur != NULL) { if (((cur->name != NULL) && (xmlStrEqual(value, cur->name))) || (xmlStrEqual(value, cur->value))) { if (xmlDebugCatalogs) { if (cur->name != NULL) xmlGenericError(xmlGenericErrorContext, "Removing element %s from catalog\n", cur->name); else xmlGenericError(xmlGenericErrorContext, "Removing element %s from catalog\n", cur->value); } cur->type = XML_CATA_REMOVED; } cur = cur->next; } return(ret); } /** * xmlCatalogXMLResolve: * @catal: a catalog list * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier for a * list of catalog entries. * * Implements (or tries to) 7.1. External Identifier Resolution * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Returns the URI of the resource or NULL if not found */ static xmlChar * xmlCatalogXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, const xmlChar *sysID) { xmlChar *ret = NULL; xmlCatalogEntryPtr cur; int haveDelegate = 0; int haveNext = 0; /* * protection against loops */ if (catal->depth > MAX_CATAL_DEPTH) { xmlCatalogErr(catal, NULL, XML_CATALOG_RECURSION, "Detected recursion in catalog %s\n", catal->name, NULL, NULL); return(NULL); } catal->depth++; /* * First tries steps 2/ 3/ 4/ if a system ID is provided. */ if (sysID != NULL) { xmlCatalogEntryPtr rewrite = NULL; int lenrewrite = 0, len; cur = catal; haveDelegate = 0; while (cur != NULL) { switch (cur->type) { case XML_CATA_SYSTEM: if (xmlStrEqual(sysID, cur->name)) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Found system match %s\n", cur->name); catal->depth--; return(xmlStrdup(cur->URL)); } break; case XML_CATA_REWRITE_SYSTEM: len = xmlStrlen(cur->name); if ((len > lenrewrite) && (!xmlStrncmp(sysID, cur->name, len))) { lenrewrite = len; rewrite = cur; } break; case XML_CATA_DELEGATE_SYSTEM: if (!xmlStrncmp(sysID, cur->name, xmlStrlen(cur->name))) haveDelegate++; break; case XML_CATA_NEXT_CATALOG: haveNext++; break; default: break; } cur = cur->next; } if (rewrite != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Using rewriting rule %s\n", rewrite->name); ret = xmlStrdup(rewrite->URL); if (ret != NULL) ret = xmlStrcat(ret, &sysID[lenrewrite]); catal->depth--; return(ret); } if (haveDelegate) { const xmlChar *delegates[MAX_DELEGATE]; int nbList = 0, i; /* * Assume the entries have been sorted by decreasing substring * matches when the list was produced. */ cur = catal; while (cur != NULL) { if ((cur->type == XML_CATA_DELEGATE_SYSTEM) && (!xmlStrncmp(sysID, cur->name, xmlStrlen(cur->name)))) { for (i = 0;i < nbList;i++) if (xmlStrEqual(cur->URL, delegates[i])) break; if (i < nbList) { cur = cur->next; continue; } if (nbList < MAX_DELEGATE) delegates[nbList++] = cur->URL; if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } if (cur->children != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Trying system delegate %s\n", cur->URL); ret = xmlCatalogListXMLResolve( cur->children, NULL, sysID); if (ret != NULL) { catal->depth--; return(ret); } } } cur = cur->next; } /* * Apply the cut algorithm explained in 4/ */ catal->depth--; return(XML_CATAL_BREAK); } } /* * Then tries 5/ 6/ if a public ID is provided */ if (pubID != NULL) { cur = catal; haveDelegate = 0; while (cur != NULL) { switch (cur->type) { case XML_CATA_PUBLIC: if (xmlStrEqual(pubID, cur->name)) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Found public match %s\n", cur->name); catal->depth--; return(xmlStrdup(cur->URL)); } break; case XML_CATA_DELEGATE_PUBLIC: if (!xmlStrncmp(pubID, cur->name, xmlStrlen(cur->name)) && (cur->prefer == XML_CATA_PREFER_PUBLIC)) haveDelegate++; break; case XML_CATA_NEXT_CATALOG: if (sysID == NULL) haveNext++; break; default: break; } cur = cur->next; } if (haveDelegate) { const xmlChar *delegates[MAX_DELEGATE]; int nbList = 0, i; /* * Assume the entries have been sorted by decreasing substring * matches when the list was produced. */ cur = catal; while (cur != NULL) { if ((cur->type == XML_CATA_DELEGATE_PUBLIC) && (cur->prefer == XML_CATA_PREFER_PUBLIC) && (!xmlStrncmp(pubID, cur->name, xmlStrlen(cur->name)))) { for (i = 0;i < nbList;i++) if (xmlStrEqual(cur->URL, delegates[i])) break; if (i < nbList) { cur = cur->next; continue; } if (nbList < MAX_DELEGATE) delegates[nbList++] = cur->URL; if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } if (cur->children != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Trying public delegate %s\n", cur->URL); ret = xmlCatalogListXMLResolve( cur->children, pubID, NULL); if (ret != NULL) { catal->depth--; return(ret); } } } cur = cur->next; } /* * Apply the cut algorithm explained in 4/ */ catal->depth--; return(XML_CATAL_BREAK); } } if (haveNext) { cur = catal; while (cur != NULL) { if (cur->type == XML_CATA_NEXT_CATALOG) { if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } if (cur->children != NULL) { ret = xmlCatalogListXMLResolve(cur->children, pubID, sysID); if (ret != NULL) { catal->depth--; return(ret); } } } cur = cur->next; } } catal->depth--; return(NULL); } /** * xmlCatalogXMLResolveURI: * @catal: a catalog list * @URI: the URI * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier for a * list of catalog entries. * * Implements (or tries to) 7.2.2. URI Resolution * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Returns the URI of the resource or NULL if not found */ static xmlChar * xmlCatalogXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) { xmlChar *ret = NULL; xmlCatalogEntryPtr cur; int haveDelegate = 0; int haveNext = 0; xmlCatalogEntryPtr rewrite = NULL; int lenrewrite = 0, len; if (catal == NULL) return(NULL); if (URI == NULL) return(NULL); /* * First tries steps 2/ 3/ 4/ if a system ID is provided. */ cur = catal; haveDelegate = 0; while (cur != NULL) { switch (cur->type) { case XML_CATA_URI: if (xmlStrEqual(URI, cur->name)) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Found URI match %s\n", cur->name); return(xmlStrdup(cur->URL)); } break; case XML_CATA_REWRITE_URI: len = xmlStrlen(cur->name); if ((len > lenrewrite) && (!xmlStrncmp(URI, cur->name, len))) { lenrewrite = len; rewrite = cur; } break; case XML_CATA_DELEGATE_URI: if (!xmlStrncmp(URI, cur->name, xmlStrlen(cur->name))) haveDelegate++; break; case XML_CATA_NEXT_CATALOG: haveNext++; break; default: break; } cur = cur->next; } if (rewrite != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Using rewriting rule %s\n", rewrite->name); ret = xmlStrdup(rewrite->URL); if (ret != NULL) ret = xmlStrcat(ret, &URI[lenrewrite]); return(ret); } if (haveDelegate) { const xmlChar *delegates[MAX_DELEGATE]; int nbList = 0, i; /* * Assume the entries have been sorted by decreasing substring * matches when the list was produced. */ cur = catal; while (cur != NULL) { if (((cur->type == XML_CATA_DELEGATE_SYSTEM) || (cur->type == XML_CATA_DELEGATE_URI)) && (!xmlStrncmp(URI, cur->name, xmlStrlen(cur->name)))) { for (i = 0;i < nbList;i++) if (xmlStrEqual(cur->URL, delegates[i])) break; if (i < nbList) { cur = cur->next; continue; } if (nbList < MAX_DELEGATE) delegates[nbList++] = cur->URL; if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } if (cur->children != NULL) { if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Trying URI delegate %s\n", cur->URL); ret = xmlCatalogListXMLResolveURI( cur->children, URI); if (ret != NULL) return(ret); } } cur = cur->next; } /* * Apply the cut algorithm explained in 4/ */ return(XML_CATAL_BREAK); } if (haveNext) { cur = catal; while (cur != NULL) { if (cur->type == XML_CATA_NEXT_CATALOG) { if (cur->children == NULL) { xmlFetchXMLCatalogFile(cur); } if (cur->children != NULL) { ret = xmlCatalogListXMLResolveURI(cur->children, URI); if (ret != NULL) return(ret); } } cur = cur->next; } } return(NULL); } /** * xmlCatalogListXMLResolve: * @catal: a catalog list * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier for a * list of catalogs * * Implements (or tries to) 7.1. External Identifier Resolution * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Returns the URI of the resource or NULL if not found */ static xmlChar * xmlCatalogListXMLResolve(xmlCatalogEntryPtr catal, const xmlChar *pubID, const xmlChar *sysID) { xmlChar *ret = NULL; xmlChar *urnID = NULL; xmlChar *normid; if (catal == NULL) return(NULL); if ((pubID == NULL) && (sysID == NULL)) return(NULL); normid = xmlCatalogNormalizePublic(pubID); if (normid != NULL) pubID = (*normid != 0 ? normid : NULL); if (!xmlStrncmp(pubID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) { urnID = xmlCatalogUnWrapURN(pubID); if (xmlDebugCatalogs) { if (urnID == NULL) xmlGenericError(xmlGenericErrorContext, "Public URN ID %s expanded to NULL\n", pubID); else xmlGenericError(xmlGenericErrorContext, "Public URN ID expanded to %s\n", urnID); } ret = xmlCatalogListXMLResolve(catal, urnID, sysID); if (urnID != NULL) xmlFree(urnID); if (normid != NULL) xmlFree(normid); return(ret); } if (!xmlStrncmp(sysID, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) { urnID = xmlCatalogUnWrapURN(sysID); if (xmlDebugCatalogs) { if (urnID == NULL) xmlGenericError(xmlGenericErrorContext, "System URN ID %s expanded to NULL\n", sysID); else xmlGenericError(xmlGenericErrorContext, "System URN ID expanded to %s\n", urnID); } if (pubID == NULL) ret = xmlCatalogListXMLResolve(catal, urnID, NULL); else if (xmlStrEqual(pubID, urnID)) ret = xmlCatalogListXMLResolve(catal, pubID, NULL); else { ret = xmlCatalogListXMLResolve(catal, pubID, urnID); } if (urnID != NULL) xmlFree(urnID); if (normid != NULL) xmlFree(normid); return(ret); } while (catal != NULL) { if (catal->type == XML_CATA_CATALOG) { if (catal->children == NULL) { xmlFetchXMLCatalogFile(catal); } if (catal->children != NULL) { ret = xmlCatalogXMLResolve(catal->children, pubID, sysID); if (ret != NULL) { if (normid != NULL) xmlFree(normid); return(ret); } } } catal = catal->next; } if (normid != NULL) xmlFree(normid); return(ret); } /** * xmlCatalogListXMLResolveURI: * @catal: a catalog list * @URI: the URI * * Do a complete resolution lookup of an URI for a list of catalogs * * Implements (or tries to) 7.2. URI Resolution * from http://www.oasis-open.org/committees/entity/spec-2001-08-06.html * * Returns the URI of the resource or NULL if not found */ static xmlChar * xmlCatalogListXMLResolveURI(xmlCatalogEntryPtr catal, const xmlChar *URI) { xmlChar *ret = NULL; xmlChar *urnID = NULL; if (catal == NULL) return(NULL); if (URI == NULL) return(NULL); if (!xmlStrncmp(URI, BAD_CAST XML_URN_PUBID, sizeof(XML_URN_PUBID) - 1)) { urnID = xmlCatalogUnWrapURN(URI); if (xmlDebugCatalogs) { if (urnID == NULL) xmlGenericError(xmlGenericErrorContext, "URN ID %s expanded to NULL\n", URI); else xmlGenericError(xmlGenericErrorContext, "URN ID expanded to %s\n", urnID); } ret = xmlCatalogListXMLResolve(catal, urnID, NULL); if (urnID != NULL) xmlFree(urnID); return(ret); } while (catal != NULL) { if (catal->type == XML_CATA_CATALOG) { if (catal->children == NULL) { xmlFetchXMLCatalogFile(catal); } if (catal->children != NULL) { ret = xmlCatalogXMLResolveURI(catal->children, URI); if (ret != NULL) return(ret); } } catal = catal->next; } return(ret); } /************************************************************************ * * * The SGML Catalog parser * * * ************************************************************************/ #define RAW *cur #define NEXT cur++; #define SKIP(x) cur += x; #define SKIP_BLANKS while (IS_BLANK_CH(*cur)) NEXT; /** * xmlParseSGMLCatalogComment: * @cur: the current character * * Skip a comment in an SGML catalog * * Returns new current character */ static const xmlChar * xmlParseSGMLCatalogComment(const xmlChar *cur) { if ((cur[0] != '-') || (cur[1] != '-')) return(cur); SKIP(2); while ((cur[0] != 0) && ((cur[0] != '-') || ((cur[1] != '-')))) NEXT; if (cur[0] == 0) { return(NULL); } return(cur + 2); } /** * xmlParseSGMLCatalogPubid: * @cur: the current character * @id: the return location * * Parse an SGML catalog ID * * Returns new current character and store the value in @id */ static const xmlChar * xmlParseSGMLCatalogPubid(const xmlChar *cur, xmlChar **id) { xmlChar *buf = NULL, *tmp; int len = 0; int size = 50; xmlChar stop; int count = 0; *id = NULL; if (RAW == '"') { NEXT; stop = '"'; } else if (RAW == '\'') { NEXT; stop = '\''; } else { stop = ' '; } buf = (xmlChar *) xmlMallocAtomic(size * sizeof(xmlChar)); if (buf == NULL) { xmlCatalogErrMemory("allocating public ID"); return(NULL); } while (IS_PUBIDCHAR_CH(*cur) || (*cur == '?')) { if ((*cur == stop) && (stop != ' ')) break; if ((stop == ' ') && (IS_BLANK_CH(*cur))) break; if (len + 1 >= size) { size *= 2; tmp = (xmlChar *) xmlRealloc(buf, size * sizeof(xmlChar)); if (tmp == NULL) { xmlCatalogErrMemory("allocating public ID"); xmlFree(buf); return(NULL); } buf = tmp; } buf[len++] = *cur; count++; NEXT; } buf[len] = 0; if (stop == ' ') { if (!IS_BLANK_CH(*cur)) { xmlFree(buf); return(NULL); } } else { if (*cur != stop) { xmlFree(buf); return(NULL); } NEXT; } *id = buf; return(cur); } /** * xmlParseSGMLCatalogName: * @cur: the current character * @name: the return location * * Parse an SGML catalog name * * Returns new current character and store the value in @name */ static const xmlChar * xmlParseSGMLCatalogName(const xmlChar *cur, xmlChar **name) { xmlChar buf[XML_MAX_NAMELEN + 5]; int len = 0; int c; *name = NULL; /* * Handler for more complex cases */ c = *cur; if ((!IS_LETTER(c) && (c != '_') && (c != ':'))) { return(NULL); } while (((IS_LETTER(c)) || (IS_DIGIT(c)) || (c == '.') || (c == '-') || (c == '_') || (c == ':'))) { buf[len++] = c; cur++; c = *cur; if (len >= XML_MAX_NAMELEN) return(NULL); } *name = xmlStrndup(buf, len); return(cur); } /** * xmlGetSGMLCatalogEntryType: * @name: the entry name * * Get the Catalog entry type for a given SGML Catalog name * * Returns Catalog entry type */ static xmlCatalogEntryType xmlGetSGMLCatalogEntryType(const xmlChar *name) { xmlCatalogEntryType type = XML_CATA_NONE; if (xmlStrEqual(name, (const xmlChar *) "SYSTEM")) type = SGML_CATA_SYSTEM; else if (xmlStrEqual(name, (const xmlChar *) "PUBLIC")) type = SGML_CATA_PUBLIC; else if (xmlStrEqual(name, (const xmlChar *) "DELEGATE")) type = SGML_CATA_DELEGATE; else if (xmlStrEqual(name, (const xmlChar *) "ENTITY")) type = SGML_CATA_ENTITY; else if (xmlStrEqual(name, (const xmlChar *) "DOCTYPE")) type = SGML_CATA_DOCTYPE; else if (xmlStrEqual(name, (const xmlChar *) "LINKTYPE")) type = SGML_CATA_LINKTYPE; else if (xmlStrEqual(name, (const xmlChar *) "NOTATION")) type = SGML_CATA_NOTATION; else if (xmlStrEqual(name, (const xmlChar *) "SGMLDECL")) type = SGML_CATA_SGMLDECL; else if (xmlStrEqual(name, (const xmlChar *) "DOCUMENT")) type = SGML_CATA_DOCUMENT; else if (xmlStrEqual(name, (const xmlChar *) "CATALOG")) type = SGML_CATA_CATALOG; else if (xmlStrEqual(name, (const xmlChar *) "BASE")) type = SGML_CATA_BASE; return(type); } /** * xmlParseSGMLCatalog: * @catal: the SGML Catalog * @value: the content of the SGML Catalog serialization * @file: the filepath for the catalog * @super: should this be handled as a Super Catalog in which case * parsing is not recursive * * Parse an SGML catalog content and fill up the @catal hash table with * the new entries found. * * Returns 0 in case of success, -1 in case of error. */ static int xmlParseSGMLCatalog(xmlCatalogPtr catal, const xmlChar *value, const char *file, int super) { const xmlChar *cur = value; xmlChar *base = NULL; int res; if ((cur == NULL) || (file == NULL)) return(-1); base = xmlStrdup((const xmlChar *) file); while ((cur != NULL) && (cur[0] != 0)) { SKIP_BLANKS; if (cur[0] == 0) break; if ((cur[0] == '-') && (cur[1] == '-')) { cur = xmlParseSGMLCatalogComment(cur); if (cur == NULL) { /* error */ break; } } else { xmlChar *sysid = NULL; xmlChar *name = NULL; xmlCatalogEntryType type = XML_CATA_NONE; cur = xmlParseSGMLCatalogName(cur, &name); if (name == NULL) { /* error */ break; } if (!IS_BLANK_CH(*cur)) { /* error */ break; } SKIP_BLANKS; if (xmlStrEqual(name, (const xmlChar *) "SYSTEM")) type = SGML_CATA_SYSTEM; else if (xmlStrEqual(name, (const xmlChar *) "PUBLIC")) type = SGML_CATA_PUBLIC; else if (xmlStrEqual(name, (const xmlChar *) "DELEGATE")) type = SGML_CATA_DELEGATE; else if (xmlStrEqual(name, (const xmlChar *) "ENTITY")) type = SGML_CATA_ENTITY; else if (xmlStrEqual(name, (const xmlChar *) "DOCTYPE")) type = SGML_CATA_DOCTYPE; else if (xmlStrEqual(name, (const xmlChar *) "LINKTYPE")) type = SGML_CATA_LINKTYPE; else if (xmlStrEqual(name, (const xmlChar *) "NOTATION")) type = SGML_CATA_NOTATION; else if (xmlStrEqual(name, (const xmlChar *) "SGMLDECL")) type = SGML_CATA_SGMLDECL; else if (xmlStrEqual(name, (const xmlChar *) "DOCUMENT")) type = SGML_CATA_DOCUMENT; else if (xmlStrEqual(name, (const xmlChar *) "CATALOG")) type = SGML_CATA_CATALOG; else if (xmlStrEqual(name, (const xmlChar *) "BASE")) type = SGML_CATA_BASE; else if (xmlStrEqual(name, (const xmlChar *) "OVERRIDE")) { xmlFree(name); cur = xmlParseSGMLCatalogName(cur, &name); if (name == NULL) { /* error */ break; } xmlFree(name); continue; } xmlFree(name); name = NULL; switch(type) { case SGML_CATA_ENTITY: if (*cur == '%') type = SGML_CATA_PENTITY; case SGML_CATA_PENTITY: case SGML_CATA_DOCTYPE: case SGML_CATA_LINKTYPE: case SGML_CATA_NOTATION: cur = xmlParseSGMLCatalogName(cur, &name); if (cur == NULL) { /* error */ break; } if (!IS_BLANK_CH(*cur)) { /* error */ break; } SKIP_BLANKS; cur = xmlParseSGMLCatalogPubid(cur, &sysid); if (cur == NULL) { /* error */ break; } break; case SGML_CATA_PUBLIC: case SGML_CATA_SYSTEM: case SGML_CATA_DELEGATE: cur = xmlParseSGMLCatalogPubid(cur, &name); if (cur == NULL) { /* error */ break; } if (type != SGML_CATA_SYSTEM) { xmlChar *normid; normid = xmlCatalogNormalizePublic(name); if (normid != NULL) { if (name != NULL) xmlFree(name); if (*normid != 0) name = normid; else { xmlFree(normid); name = NULL; } } } if (!IS_BLANK_CH(*cur)) { /* error */ break; } SKIP_BLANKS; cur = xmlParseSGMLCatalogPubid(cur, &sysid); if (cur == NULL) { /* error */ break; } break; case SGML_CATA_BASE: case SGML_CATA_CATALOG: case SGML_CATA_DOCUMENT: case SGML_CATA_SGMLDECL: cur = xmlParseSGMLCatalogPubid(cur, &sysid); if (cur == NULL) { /* error */ break; } break; default: break; } if (cur == NULL) { if (name != NULL) xmlFree(name); if (sysid != NULL) xmlFree(sysid); break; } else if (type == SGML_CATA_BASE) { if (base != NULL) xmlFree(base); base = xmlStrdup(sysid); } else if ((type == SGML_CATA_PUBLIC) || (type == SGML_CATA_SYSTEM)) { xmlChar *filename; filename = xmlBuildURI(sysid, base); if (filename != NULL) { xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(type, name, filename, NULL, XML_CATA_PREFER_NONE); res = xmlHashAddEntry(catal->sgml, name, entry); if (res < 0) { xmlFreeCatalogEntry(entry); } xmlFree(filename); } } else if (type == SGML_CATA_CATALOG) { if (super) { xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(type, sysid, NULL, NULL, XML_CATA_PREFER_NONE); res = xmlHashAddEntry(catal->sgml, sysid, entry); if (res < 0) { xmlFreeCatalogEntry(entry); } } else { xmlChar *filename; filename = xmlBuildURI(sysid, base); if (filename != NULL) { xmlExpandCatalog(catal, (const char *)filename); xmlFree(filename); } } } /* * drop anything else we won't handle it */ if (name != NULL) xmlFree(name); if (sysid != NULL) xmlFree(sysid); } } if (base != NULL) xmlFree(base); if (cur == NULL) return(-1); return(0); } /************************************************************************ * * * SGML Catalog handling * * * ************************************************************************/ /** * xmlCatalogGetSGMLPublic: * @catal: an SGML catalog hash * @pubID: the public ID string * * Try to lookup the catalog local reference associated to a public ID * * Returns the local resource if found or NULL otherwise. */ static const xmlChar * xmlCatalogGetSGMLPublic(xmlHashTablePtr catal, const xmlChar *pubID) { xmlCatalogEntryPtr entry; xmlChar *normid; if (catal == NULL) return(NULL); normid = xmlCatalogNormalizePublic(pubID); if (normid != NULL) pubID = (*normid != 0 ? normid : NULL); entry = (xmlCatalogEntryPtr) xmlHashLookup(catal, pubID); if (entry == NULL) { if (normid != NULL) xmlFree(normid); return(NULL); } if (entry->type == SGML_CATA_PUBLIC) { if (normid != NULL) xmlFree(normid); return(entry->URL); } if (normid != NULL) xmlFree(normid); return(NULL); } /** * xmlCatalogGetSGMLSystem: * @catal: an SGML catalog hash * @sysID: the system ID string * * Try to lookup the catalog local reference for a system ID * * Returns the local resource if found or NULL otherwise. */ static const xmlChar * xmlCatalogGetSGMLSystem(xmlHashTablePtr catal, const xmlChar *sysID) { xmlCatalogEntryPtr entry; if (catal == NULL) return(NULL); entry = (xmlCatalogEntryPtr) xmlHashLookup(catal, sysID); if (entry == NULL) return(NULL); if (entry->type == SGML_CATA_SYSTEM) return(entry->URL); return(NULL); } /** * xmlCatalogSGMLResolve: * @catal: the SGML catalog * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier * * Returns the URI of the resource or NULL if not found */ static const xmlChar * xmlCatalogSGMLResolve(xmlCatalogPtr catal, const xmlChar *pubID, const xmlChar *sysID) { const xmlChar *ret = NULL; if (catal->sgml == NULL) return(NULL); if (pubID != NULL) ret = xmlCatalogGetSGMLPublic(catal->sgml, pubID); if (ret != NULL) return(ret); if (sysID != NULL) ret = xmlCatalogGetSGMLSystem(catal->sgml, sysID); return(NULL); } /************************************************************************ * * * Specific Public interfaces * * * ************************************************************************/ /** * xmlLoadSGMLSuperCatalog: * @filename: a file path * * Load an SGML super catalog. It won't expand CATALOG or DELEGATE * references. This is only needed for manipulating SGML Super Catalogs * like adding and removing CATALOG or DELEGATE entries. * * Returns the catalog parsed or NULL in case of error */ xmlCatalogPtr xmlLoadSGMLSuperCatalog(const char *filename) { xmlChar *content; xmlCatalogPtr catal; int ret; content = xmlLoadFileContent(filename); if (content == NULL) return(NULL); catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if (catal == NULL) { xmlFree(content); return(NULL); } ret = xmlParseSGMLCatalog(catal, content, filename, 1); xmlFree(content); if (ret < 0) { xmlFreeCatalog(catal); return(NULL); } return (catal); } /** * xmlLoadACatalog: * @filename: a file path * * Load the catalog and build the associated data structures. * This can be either an XML Catalog or an SGML Catalog * It will recurse in SGML CATALOG entries. On the other hand XML * Catalogs are not handled recursively. * * Returns the catalog parsed or NULL in case of error */ xmlCatalogPtr xmlLoadACatalog(const char *filename) { xmlChar *content; xmlChar *first; xmlCatalogPtr catal; int ret; content = xmlLoadFileContent(filename); if (content == NULL) return(NULL); first = content; while ((*first != 0) && (*first != '-') && (*first != '<') && (!(((*first >= 'A') && (*first <= 'Z')) || ((*first >= 'a') && (*first <= 'z'))))) first++; if (*first != '<') { catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if (catal == NULL) { xmlFree(content); return(NULL); } ret = xmlParseSGMLCatalog(catal, content, filename, 0); if (ret < 0) { xmlFreeCatalog(catal); xmlFree(content); return(NULL); } } else { catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if (catal == NULL) { xmlFree(content); return(NULL); } catal->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, NULL, BAD_CAST filename, xmlCatalogDefaultPrefer); } xmlFree(content); return (catal); } /** * xmlExpandCatalog: * @catal: a catalog * @filename: a file path * * Load the catalog and expand the existing catal structure. * This can be either an XML Catalog or an SGML Catalog * * Returns 0 in case of success, -1 in case of error */ static int xmlExpandCatalog(xmlCatalogPtr catal, const char *filename) { int ret; if ((catal == NULL) || (filename == NULL)) return(-1); if (catal->type == XML_SGML_CATALOG_TYPE) { xmlChar *content; content = xmlLoadFileContent(filename); if (content == NULL) return(-1); ret = xmlParseSGMLCatalog(catal, content, filename, 0); if (ret < 0) { xmlFree(content); return(-1); } xmlFree(content); } else { xmlCatalogEntryPtr tmp, cur; tmp = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, NULL, BAD_CAST filename, xmlCatalogDefaultPrefer); cur = catal->xml; if (cur == NULL) { catal->xml = tmp; } else { while (cur->next != NULL) cur = cur->next; cur->next = tmp; } } return (0); } /** * xmlACatalogResolveSystem: * @catal: a Catalog * @sysID: the system ID string * * Try to lookup the catalog resource for a system ID * * Returns the resource if found or NULL otherwise, the value returned * must be freed by the caller. */ xmlChar * xmlACatalogResolveSystem(xmlCatalogPtr catal, const xmlChar *sysID) { xmlChar *ret = NULL; if ((sysID == NULL) || (catal == NULL)) return(NULL); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve sysID %s\n", sysID); if (catal->type == XML_XML_CATALOG_TYPE) { ret = xmlCatalogListXMLResolve(catal->xml, NU S! ~LIBXML2-2_6_13.bckn'wE([TOOLS.LIBSRC.libxml2-2_6_13]catalog.c;1bLL, sysID); if (ret == XML_CATAL_BREAK) ret = NULL; } else { const xmlChar *sgml; sgml = xmlCatalogGetSGMLSystem(catal->sgml, sysID); if (sgml != NULL) ret = xmlStrdup(sgml); } return(ret); } /** * xmlACatalogResolvePublic: * @catal: a Catalog * @pubID: the public ID string * * Try to lookup the catalog local reference associated to a public ID in that catalog * * Returns the local resource if found or NULL otherwise, the value returned * must be freed by the caller. */ xmlChar * xmlACatalogResolvePublic(xmlCatalogPtr catal, const xmlChar *pubID) { xmlChar *ret = NULL; if ((pubID == NULL) || (catal == NULL)) return(NULL); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve pubID %s\n", pubID); if (catal->type == XML_XML_CATALOG_TYPE) { ret = xmlCatalogListXMLResolve(catal->xml, pubID, NULL); if (ret == XML_CATAL_BREAK) ret = NULL; } else { const xmlChar *sgml; sgml = xmlCatalogGetSGMLPublic(catal->sgml, pubID); if (sgml != NULL) ret = xmlStrdup(sgml); } return(ret); } /** * xmlACatalogResolve: * @catal: a Catalog * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlACatalogResolve(xmlCatalogPtr catal, const xmlChar * pubID, const xmlChar * sysID) { xmlChar *ret = NULL; if (((pubID == NULL) && (sysID == NULL)) || (catal == NULL)) return (NULL); if (xmlDebugCatalogs) { if ((pubID != NULL) && (sysID != NULL)) { xmlGenericError(xmlGenericErrorContext, "Resolve: pubID %s sysID %s\n", pubID, sysID); } else if (pubID != NULL) { xmlGenericError(xmlGenericErrorContext, "Resolve: pubID %s\n", pubID); } else { xmlGenericError(xmlGenericErrorContext, "Resolve: sysID %s\n", sysID); } } if (catal->type == XML_XML_CATALOG_TYPE) { ret = xmlCatalogListXMLResolve(catal->xml, pubID, sysID); if (ret == XML_CATAL_BREAK) ret = NULL; } else { const xmlChar *sgml; sgml = xmlCatalogSGMLResolve(catal, pubID, sysID); if (sgml != NULL) ret = xmlStrdup(sgml); } return (ret); } /** * xmlACatalogResolveURI: * @catal: a Catalog * @URI: the URI * * Do a complete resolution lookup of an URI * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlACatalogResolveURI(xmlCatalogPtr catal, const xmlChar *URI) { xmlChar *ret = NULL; if ((URI == NULL) || (catal == NULL)) return(NULL); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve URI %s\n", URI); if (catal->type == XML_XML_CATALOG_TYPE) { ret = xmlCatalogListXMLResolveURI(catal->xml, URI); if (ret == XML_CATAL_BREAK) ret = NULL; } else { const xmlChar *sgml; sgml = xmlCatalogSGMLResolve(catal, NULL, URI); if (sgml != NULL) sgml = xmlStrdup(sgml); } return(ret); } #ifdef LIBXML_OUTPUT_ENABLED /** * xmlACatalogDump: * @catal: a Catalog * @out: the file. * * Dump the given catalog to the given file. */ void xmlACatalogDump(xmlCatalogPtr catal, FILE *out) { if ((out == NULL) || (catal == NULL)) return; if (catal->type == XML_XML_CATALOG_TYPE) { xmlDumpXMLCatalog(out, catal->xml); } else { xmlHashScan(catal->sgml, (xmlHashScanner) xmlCatalogDumpEntry, out); } } #endif /* LIBXML_OUTPUT_ENABLED */ /** * xmlACatalogAdd: * @catal: a Catalog * @type: the type of record to add to the catalog * @orig: the system, public or prefix to match * @replace: the replacement value for the match * * Add an entry in the catalog, it may overwrite existing but * different entries. * * Returns 0 if successful, -1 otherwise */ int xmlACatalogAdd(xmlCatalogPtr catal, const xmlChar * type, const xmlChar * orig, const xmlChar * replace) { int res = -1; if (catal == NULL) return(-1); if (catal->type == XML_XML_CATALOG_TYPE) { res = xmlAddXMLCatalog(catal->xml, type, orig, replace); } else { xmlCatalogEntryType cattype; cattype = xmlGetSGMLCatalogEntryType(type); if (cattype != XML_CATA_NONE) { xmlCatalogEntryPtr entry; entry = xmlNewCatalogEntry(cattype, orig, replace, NULL, XML_CATA_PREFER_NONE); if (catal->sgml == NULL) catal->sgml = xmlHashCreate(10); res = xmlHashAddEntry(catal->sgml, orig, entry); } } return (res); } /** * xmlACatalogRemove: * @catal: a Catalog * @value: the value to remove * * Remove an entry from the catalog * * Returns the number of entries removed if successful, -1 otherwise */ int xmlACatalogRemove(xmlCatalogPtr catal, const xmlChar *value) { int res = -1; if ((catal == NULL) || (value == NULL)) return(-1); if (catal->type == XML_XML_CATALOG_TYPE) { res = xmlDelXMLCatalog(catal->xml, value); } else { res = xmlHashRemoveEntry(catal->sgml, value, (xmlHashDeallocator) xmlFreeCatalogEntry); if (res == 0) res = 1; } return(res); } /** * xmlNewCatalog: * @sgml: should this create an SGML catalog * * create a new Catalog. * * Returns the xmlCatalogPtr or NULL in case of error */ xmlCatalogPtr xmlNewCatalog(int sgml) { xmlCatalogPtr catal = NULL; if (sgml) { catal = xmlCreateNewCatalog(XML_SGML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if ((catal != NULL) && (catal->sgml == NULL)) catal->sgml = xmlHashCreate(10); } else catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); return(catal); } /** * xmlCatalogIsEmpty: * @catal: should this create an SGML catalog * * Check is a catalog is empty * * Returns 1 if the catalog is empty, 0 if not, amd -1 in case of error. */ int xmlCatalogIsEmpty(xmlCatalogPtr catal) { if (catal == NULL) return(-1); if (catal->type == XML_XML_CATALOG_TYPE) { if (catal->xml == NULL) return(1); if ((catal->xml->type != XML_CATA_CATALOG) && (catal->xml->type != XML_CATA_BROKEN_CATALOG)) return(-1); if (catal->xml->children == NULL) return(1); return(0); } else { int res; if (catal->sgml == NULL) return(1); res = xmlHashSize(catal->sgml); if (res == 0) return(1); if (res < 0) return(-1); } return(0); } /************************************************************************ * * * Public interfaces manipulating the global shared default catalog * * * ************************************************************************/ /** * xmlInitializeCatalogData: * * Do the catalog initialization only of global data, doesn't try to load * any catalog actually. * this function is not thread safe, catalog initialization should * preferably be done once at startup */ static void xmlInitializeCatalogData(void) { if (xmlCatalogInitialized != 0) return; if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; xmlCatalogMutex = xmlNewRMutex(); xmlCatalogInitialized = 1; } /** * xmlInitializeCatalog: * * Do the catalog initialization. * this function is not thread safe, catalog initialization should * preferably be done once at startup */ void xmlInitializeCatalog(void) { if (xmlCatalogInitialized != 0) return; xmlInitializeCatalogData(); xmlRMutexLock(xmlCatalogMutex); if (getenv("XML_DEBUG_CATALOG")) xmlDebugCatalogs = 1; if (xmlDefaultCatalog == NULL) { const char *catalogs; char *path; const char *cur, *paths; xmlCatalogPtr catal; xmlCatalogEntryPtr *nextent; catalogs = (const char *) getenv("XML_CATALOG_FILES"); if (catalogs == NULL) #if defined(_WIN32) && defined(_MSC_VER) { void* hmodule; hmodule = GetModuleHandleA("libxml2.dll"); if (hmodule == NULL) hmodule = GetModuleHandleA(NULL); if (hmodule != NULL) { char buf[256]; unsigned long len = GetModuleFileNameA(hmodule, buf, 255); if (len != 0) { char* p = &(buf[len]); while (*p != '\\' && p > buf) p--; if (p != buf) { xmlChar* uri; strncpy(p, "\\..\\etc\\catalog", 255 - (p - buf)); uri = xmlCanonicPath(buf); if (uri != NULL) { strncpy(XML_XML_DEFAULT_CATALOG, uri, 255); xmlFree(uri); } } } } catalogs = XML_XML_DEFAULT_CATALOG; } #else catalogs = XML_XML_DEFAULT_CATALOG; #endif catal = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); if (catal != NULL) { /* the XML_CATALOG_FILES envvar is allowed to contain a space-separated list of entries. */ cur = catalogs; nextent = &catal->xml; while (*cur != '\0') { while (xmlIsBlank_ch(*cur)) cur++; if (*cur != 0) { paths = cur; while ((*cur != 0) && (!xmlIsBlank_ch(*cur))) cur++; path = (char *) xmlStrndup((const xmlChar *)paths, cur - paths); if (path != NULL) { *nextent = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, NULL, BAD_CAST path, xmlCatalogDefaultPrefer); if (*nextent != NULL) nextent = &((*nextent)->next); xmlFree(path); } } } xmlDefaultCatalog = catal; } } xmlRMutexUnlock(xmlCatalogMutex); } /** * xmlLoadCatalog: * @filename: a file path * * Load the catalog and makes its definitions effective for the default * external entity loader. It will recurse in SGML CATALOG entries. * this function is not thread safe, catalog initialization should * preferably be done once at startup * * Returns 0 in case of success -1 in case of error */ int xmlLoadCatalog(const char *filename) { int ret; xmlCatalogPtr catal; if (!xmlCatalogInitialized) xmlInitializeCatalogData(); xmlRMutexLock(xmlCatalogMutex); if (xmlDefaultCatalog == NULL) { catal = xmlLoadACatalog(filename); if (catal == NULL) { xmlRMutexUnlock(xmlCatalogMutex); return(-1); } xmlDefaultCatalog = catal; xmlRMutexUnlock(xmlCatalogMutex); return(0); } ret = xmlExpandCatalog(xmlDefaultCatalog, filename); xmlRMutexUnlock(xmlCatalogMutex); return(ret); } /** * xmlLoadCatalogs: * @pathss: a list of directories separated by a colon or a space. * * Load the catalogs and makes their definitions effective for the default * external entity loader. * this function is not thread safe, catalog initialization should * preferably be done once at startup */ void xmlLoadCatalogs(const char *pathss) { const char *cur; const char *paths; xmlChar *path; if (pathss == NULL) return; cur = pathss; while ((cur != NULL) && (*cur != 0)) { while (xmlIsBlank_ch(*cur)) cur++; if (*cur != 0) { paths = cur; while ((*cur != 0) && (*cur != ':') && (!xmlIsBlank_ch(*cur))) cur++; path = xmlStrndup((const xmlChar *)paths, cur - paths); if (path != NULL) { xmlLoadCatalog((const char *) path); xmlFree(path); } } while (*cur == ':') cur++; } } /** * xmlCatalogCleanup: * * Free up all the memory associated with catalogs */ void xmlCatalogCleanup(void) { if (xmlCatalogInitialized == 0) return; xmlRMutexLock(xmlCatalogMutex); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Catalogs cleanup\n"); if (xmlCatalogXMLFiles != NULL) xmlHashFree(xmlCatalogXMLFiles, (xmlHashDeallocator)xmlFreeCatalogHashEntryList); xmlCatalogXMLFiles = NULL; if (xmlDefaultCatalog != NULL) xmlFreeCatalog(xmlDefaultCatalog); xmlDefaultCatalog = NULL; xmlDebugCatalogs = 0; xmlCatalogInitialized = 0; xmlRMutexUnlock(xmlCatalogMutex); xmlFreeRMutex(xmlCatalogMutex); } /** * xmlCatalogResolveSystem: * @sysID: the system ID string * * Try to lookup the catalog resource for a system ID * * Returns the resource if found or NULL otherwise, the value returned * must be freed by the caller. */ xmlChar * xmlCatalogResolveSystem(const xmlChar *sysID) { xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); ret = xmlACatalogResolveSystem(xmlDefaultCatalog, sysID); return(ret); } /** * xmlCatalogResolvePublic: * @pubID: the public ID string * * Try to lookup the catalog reference associated to a public ID * * Returns the resource if found or NULL otherwise, the value returned * must be freed by the caller. */ xmlChar * xmlCatalogResolvePublic(const xmlChar *pubID) { xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); ret = xmlACatalogResolvePublic(xmlDefaultCatalog, pubID); return(ret); } /** * xmlCatalogResolve: * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlCatalogResolve(const xmlChar *pubID, const xmlChar *sysID) { xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); ret = xmlACatalogResolve(xmlDefaultCatalog, pubID, sysID); return(ret); } /** * xmlCatalogResolveURI: * @URI: the URI * * Do a complete resolution lookup of an URI * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlCatalogResolveURI(const xmlChar *URI) { xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); ret = xmlACatalogResolveURI(xmlDefaultCatalog, URI); return(ret); } #ifdef LIBXML_OUTPUT_ENABLED /** * xmlCatalogDump: * @out: the file. * * Dump all the global catalog content to the given file. */ void xmlCatalogDump(FILE *out) { if (out == NULL) return; if (!xmlCatalogInitialized) xmlInitializeCatalog(); xmlACatalogDump(xmlDefaultCatalog, out); } #endif /* LIBXML_OUTPUT_ENABLED */ /** * xmlCatalogAdd: * @type: the type of record to add to the catalog * @orig: the system, public or prefix to match * @replace: the replacement value for the match * * Add an entry in the catalog, it may overwrite existing but * different entries. * If called before any other catalog routine, allows to override the * default shared catalog put in place by xmlInitializeCatalog(); * * Returns 0 if successful, -1 otherwise */ int xmlCatalogAdd(const xmlChar *type, const xmlChar *orig, const xmlChar *replace) { int res = -1; if (!xmlCatalogInitialized) xmlInitializeCatalogData(); xmlRMutexLock(xmlCatalogMutex); /* * Specific case where one want to override the default catalog * put in place by xmlInitializeCatalog(); */ if ((xmlDefaultCatalog == NULL) && (xmlStrEqual(type, BAD_CAST "catalog"))) { xmlDefaultCatalog = xmlCreateNewCatalog(XML_XML_CATALOG_TYPE, xmlCatalogDefaultPrefer); xmlDefaultCatalog->xml = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, orig, NULL, xmlCatalogDefaultPrefer); xmlRMutexUnlock(xmlCatalogMutex); return(0); } res = xmlACatalogAdd(xmlDefaultCatalog, type, orig, replace); xmlRMutexUnlock(xmlCatalogMutex); return(res); } /** * xmlCatalogRemove: * @value: the value to remove * * Remove an entry from the catalog * * Returns the number of entries removed if successful, -1 otherwise */ int xmlCatalogRemove(const xmlChar *value) { int res; if (!xmlCatalogInitialized) xmlInitializeCatalog(); xmlRMutexLock(xmlCatalogMutex); res = xmlACatalogRemove(xmlDefaultCatalog, value); xmlRMutexUnlock(xmlCatalogMutex); return(res); } /** * xmlCatalogConvert: * * Convert all the SGML catalog entries as XML ones * * Returns the number of entries converted if successful, -1 otherwise */ int xmlCatalogConvert(void) { int res = -1; if (!xmlCatalogInitialized) xmlInitializeCatalog(); xmlRMutexLock(xmlCatalogMutex); res = xmlConvertSGMLCatalog(xmlDefaultCatalog); xmlRMutexUnlock(xmlCatalogMutex); return(res); } /************************************************************************ * * * Public interface manipulating the common preferences * * * ************************************************************************/ /** * xmlCatalogGetDefaults: * * Used to get the user preference w.r.t. to what catalogs should * be accepted * * Returns the current xmlCatalogAllow value */ xmlCatalogAllow xmlCatalogGetDefaults(void) { return(xmlCatalogDefaultAllow); } /** * xmlCatalogSetDefaults: * @allow: what catalogs should be accepted * * Used to set the user preference w.r.t. to what catalogs should * be accepted */ void xmlCatalogSetDefaults(xmlCatalogAllow allow) { if (xmlDebugCatalogs) { switch (allow) { case XML_CATA_ALLOW_NONE: xmlGenericError(xmlGenericErrorContext, "Disabling catalog usage\n"); break; case XML_CATA_ALLOW_GLOBAL: xmlGenericError(xmlGenericErrorContext, "Allowing only global catalogs\n"); break; case XML_CATA_ALLOW_DOCUMENT: xmlGenericError(xmlGenericErrorContext, "Allowing only catalogs from the document\n"); break; case XML_CATA_ALLOW_ALL: xmlGenericError(xmlGenericErrorContext, "Allowing all catalogs\n"); break; } } xmlCatalogDefaultAllow = allow; } /** * xmlCatalogSetDefaultPrefer: * @prefer: the default preference for delegation * * Allows to set the preference between public and system for deletion * in XML Catalog resolution. C.f. section 4.1.1 of the spec * Values accepted are XML_CATA_PREFER_PUBLIC or XML_CATA_PREFER_SYSTEM * * Returns the previous value of the default preference for delegation */ xmlCatalogPrefer xmlCatalogSetDefaultPrefer(xmlCatalogPrefer prefer) { xmlCatalogPrefer ret = xmlCatalogDefaultPrefer; if (prefer == XML_CATA_PREFER_NONE) return(ret); if (xmlDebugCatalogs) { switch (prefer) { case XML_CATA_PREFER_PUBLIC: xmlGenericError(xmlGenericErrorContext, "Setting catalog preference to PUBLIC\n"); break; case XML_CATA_PREFER_SYSTEM: xmlGenericError(xmlGenericErrorContext, "Setting catalog preference to SYSTEM\n"); break; case XML_CATA_PREFER_NONE: break; } } xmlCatalogDefaultPrefer = prefer; return(ret); } /** * xmlCatalogSetDebug: * @level: the debug level of catalogs required * * Used to set the debug level for catalog operation, 0 disable * debugging, 1 enable it * * Returns the previous value of the catalog debugging level */ int xmlCatalogSetDebug(int level) { int ret = xmlDebugCatalogs; if (level <= 0) xmlDebugCatalogs = 0; else xmlDebugCatalogs = level; return(ret); } /************************************************************************ * * * Minimal interfaces used for per-document catalogs by the parser * * * ************************************************************************/ /** * xmlCatalogFreeLocal: * @catalogs: a document's list of catalogs * * Free up the memory associated to the catalog list */ void xmlCatalogFreeLocal(void *catalogs) { xmlCatalogEntryPtr catal; if (!xmlCatalogInitialized) xmlInitializeCatalog(); catal = (xmlCatalogEntryPtr) catalogs; if (catal != NULL) xmlFreeCatalogEntryList(catal); } /** * xmlCatalogAddLocal: * @catalogs: a document's list of catalogs * @URL: the URL to a new local catalog * * Add the new entry to the catalog list * * Returns the updated list */ void * xmlCatalogAddLocal(void *catalogs, const xmlChar *URL) { xmlCatalogEntryPtr catal, add; if (!xmlCatalogInitialized) xmlInitializeCatalog(); if (URL == NULL) return(catalogs); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Adding document catalog %s\n", URL); add = xmlNewCatalogEntry(XML_CATA_CATALOG, NULL, URL, NULL, xmlCatalogDefaultPrefer); if (add == NULL) return(catalogs); catal = (xmlCatalogEntryPtr) catalogs; if (catal == NULL) return((void *) add); while (catal->next != NULL) catal = catal->next; catal->next = add; return(catalogs); } /** * xmlCatalogLocalResolve: * @catalogs: a document's list of catalogs * @pubID: the public ID string * @sysID: the system ID string * * Do a complete resolution lookup of an External Identifier using a * document's private catalog list * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlCatalogLocalResolve(void *catalogs, const xmlChar *pubID, const xmlChar *sysID) { xmlCatalogEntryPtr catal; xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); if ((pubID == NULL) && (sysID == NULL)) return(NULL); if (xmlDebugCatalogs) { if ((pubID != NULL) && (sysID != NULL)) { xmlGenericError(xmlGenericErrorContext, "Local Resolve: pubID %s sysID %s\n", pubID, sysID); } else if (pubID != NULL) { xmlGenericError(xmlGenericErrorContext, "Local Resolve: pubID %s\n", pubID); } else { xmlGenericError(xmlGenericErrorContext, "Local Resolve: sysID %s\n", sysID); } } catal = (xmlCatalogEntryPtr) catalogs; if (catal == NULL) return(NULL); ret = xmlCatalogListXMLResolve(catal, pubID, sysID); if ((ret != NULL) && (ret != XML_CATAL_BREAK)) return(ret); return(NULL); } /** * xmlCatalogLocalResolveURI: * @catalogs: a document's list of catalogs * @URI: the URI * * Do a complete resolution lookup of an URI using a * document's private catalog list * * Returns the URI of the resource or NULL if not found, it must be freed * by the caller. */ xmlChar * xmlCatalogLocalResolveURI(void *catalogs, const xmlChar *URI) { xmlCatalogEntryPtr catal; xmlChar *ret; if (!xmlCatalogInitialized) xmlInitializeCatalog(); if (URI == NULL) return(NULL); if (xmlDebugCatalogs) xmlGenericError(xmlGenericErrorContext, "Resolve URI %s\n", URI); catal = (xmlCatalogEntryPtr) catalogs; if (catal == NULL) return(NULL); ret = xmlCatalogListXMLResolveURI(catal, URI); if ((ret != NULL) && (ret != XML_CATAL_BREAK)) return(ret); return(NULL); } /************************************************************************ * * * Deprecated interfaces * * * ************************************************************************/ /** * xmlCatalogGetSystem: * @sysID: the system ID string * * Try to lookup the catalog reference associated to a system ID * DEPRECATED, use xmlCatalogResolveSystem() * * Returns the resource if found or NULL otherwise. */ const xmlChar * xmlCatalogGetSystem(const xmlChar *sysID) { xmlChar *ret; static xmlChar result[1000]; static int msg = 0; if (!xmlCatalogInitialized) xmlInitializeCatalog(); if (msg == 0) { xmlGenericError(xmlGenericErrorContext, "Use of deprecated xmlCatalogGetSystem() call\n"); msg++; } if (sysID == NULL) return(NULL); /* * Check first the XML catalogs */ if (xmlDefaultCatalog != NULL) { ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml, NULL, sysID); if ((ret != NULL) && (ret != XML_CATAL_BREAK)) { snprintf((char *) result, sizeof(result) - 1, "%s", (char *) ret); result[sizeof(result) - 1] = 0; return(result); } } if (xmlDefaultCatalog != NULL) return(xmlCatalogGetSGMLSystem(xmlDefaultCatalog->sgml, sysID)); return(NULL); } /** * xmlCatalogGetPublic: * @pubID: the public ID string * * Try to lookup the catalog reference associated to a public ID * DEPRECATED, use xmlCatalogResolvePublic() * * Returns the resource if found or NULL otherwise. */ const xmlChar * xmlCatalogGetPublic(const xmlChar *pubID) { xmlChar *ret; static xmlChar result[1000]; static int msg = 0; if (!xmlCatalogInitialized) xmlInitializeCatalog(); if (msg == 0) { xmlGenericError(xmlGenericErrorContext, "Use of deprecated xmlCatalogGetPublic() call\n"); msg++; } if (pubID == NULL) return(NULL); /* * Check first the XML catalogs */ if (xmlDefaultCatalog != NULL) { ret = xmlCatalogListXMLResolve(xmlDefaultCatalog->xml, pubID, NULL); if ((ret != NULL) && (ret != XML_CATAL_BREAK)) { snprintf((char *) result, sizeof(result) - 1, "%s", (char *) ret); result[sizeof(result) - 1] = 0; return(result); } } if (xmlDefaultCatalog != NULL) return(xmlCatalogGetSGMLPublic(xmlDefaultCatalog->sgml, pubID)); return(NULL); } #endif /* LIBXML_CATALOG_ENABLED */ 0)*[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1+,7.'/ 4'#-wE0123KPWO(56er7U%Q~89]^_`GHJTue Aug 31 14:14:30 CEST 2004 Daniel Veillard * xmlIO.c: fixing #151456, an encoding error could generate a serialization loop. Tue Aug 31 11:34:04 CEST 2004 Daniel Veillard * Makefile.am: also produce a tar ball with just the sources * xmllint.c: added --path option and --load-trace options to xmllint, RFE #147740 based on xsltproc versions * doc/xmllint.* doc/*: updated the man page and rebuilt Tue Aug 31 10:37:23 CEST 2004 Daniel Veillard * xmlschemastypes.c: "" is a valid hexbinary string dixit xmlschema-dev * result/schemas/hexbinary_0_1.err test/schemas/hexbinary_1.xml: update the test. * test/ns5 result//ns5*: added a test for the namespace bug fixed in previous commit. * Makefile.am: added a message in the regression tests Mon Aug 30 23:36:21 PDT 2004 William Brack * SAX2.c: fixed bug introduced during OOM fixup causing problems with default namespace when a named prefix with the same href was present (reported on the mailing list by Karl Eichwalder. * xmlstring.c: modified xmlCheckUTF8 with suggested code from Julius Mittenzwei. * dict.c: added a typecast to try to avoid problem reported by Pascal Rodes. Mon Aug 30 12:45:46 CEST 2004 Kasimier Buchcik * xmlschemas.c: Fixed a bug in xmlSchemasCheckFacet, which did not create a computed value on a facet and thus crashed during validation of instances. Expanded validity checks for min/maxOccurs attributes. Expanded validity checks for the value of the attribute "form". Fri Aug 27 18:32:24 PST 2004 William Brack * xmlstring.c: fixed a problem with xmlCheckUTF8 reported on the mailing list by Julius Mittenzwei Fri Aug 27 00:13:39 CEST 2004 Daniel Veillard * libxml.spec.in: added BuildRequires: zlib-devel, fixes Red Hat bug #124942 Thu Aug 26 12:27:23 CEST 2004 Daniel Veillard * parser.c: remove a warning on Solaris * xmlschemastype.c: fix a crashing bug #151111 Wed Aug 25 22:20:18 CEST 2004 Kasimier Buchcik * test/schemas/import-bad-1_0.imp: Added missing test file. * xmlschemas.c include/libxml/xmlerror.h include/libxml/xmlschemas.h: Substituted the obsolete xmlSchemaValidError(s) for xmlParserErrors - see #150840. Changed the import of schemas to allow failure of location of a resource to be imported. * result/schemas/all_* result/schemas/any3_0_0.err result/schemas/choice_* result/schemas/import1_0_0.err result/schemas/list0_0_1.err result/schemas/list0_1_0.err result/schemas/list0_1_1.err result/schemas/ns0_0_2.err result/schemas/ns0_1_2.err: Adapted regression test results. Tue Aug 24 20:49:15 MDT 2004 John Fleck * doc/tutorial/xmltutorial.xml, xmltutorial.pdf, *.html fix Xpath memory leak (thanks to sKaBoy and William Brack) Tue Aug 24 21:10:59 CEST 2004 Igor Zlatkovic * parser.c: fixed path problem in DTD loading reported by Sameer Abhinkar Tue Aug 24 16:40:51 CEST 2004 Igor Zlatkovic * win32/configure.js: added support for version extra * win32/Makefile.*: upgraded to zlib 1.2.1 Mon Aug 23 14:33:54 CEST 2004 Daniel Veillard * configure.in: removing -O -g from default gcc flags #150828 Sun Aug 22 16:26:46 CEST 2004 Daniel Veillard * configure.in doc/* NEWS: preparing 2.6.12 release, updated and and rebuilt the docs. Sun Aug 22 16:07:20 CEST 2004 Daniel Veillard * python/libxml.c: fix a problem on last commit Sun Aug 22 15:16:53 CEST 2004 Daniel Veillard * xmllint.c xpath.c include/libxml/xpath.h include/libxml/xpathInternals.h python/libxml.c python/libxml_wrap.h: trying to remove some warning when compiling on Fedora Core 3 and 64bits Sat Aug 21 0:035:10 CET 2004 Kasimier Buchcik * xmlschemas.c: modified parsing of , , , , , , . Fixed schema defaults (elementFormDefault, etc.) for included schemas. Fixed a bug which reported attributes as invalid on elements declarations with the built-in type 'anyType'. Added "lax" validation of the content of elements of type 'anyType'. Fixed: element declarations with the same name were treated as duplicate if located in the subtree of -> . (This was bug 150623, submitted by Roland Lezuo) Fixed cleanup of error codes in xmlSchemaValidateDoc as proposed by Igor Kapitanker. (This was bug 150647, submitted by Igor Kapitanker) * xmlschemastypes.c: Changed the type of anyType to XML_SCHEMAS_ANYTYPE. * include/libxml/xmlerror.h: Added schema parser errors. * result/schemas/bug145246_0_0* result/schemas/extension1_0_2.err: Changed test results. * result/schemas/ct-sc-nobase_0_0* result/schemas/facet-whiteSpace_0_0* result/schemas/import1_0_0* result/schemas/import2_0_0* result/schemas/include2_0_0* result/schemas/include3_0_0* result/schemas/restriction-attr1_0_0* result/schemas/seq-dubl-elem1_0_0* result/schemas/xsd-list-itemType_0_0*: Added new rest results. test/schemas/bug145246.xsd.imp test/schemas/ct-sc-nobase_0* test/schemas/facet-whiteSpace_0* test/schemas/import1_0* test/schemas/import2_0* test/schemas/include2_0* test/schemas/include3_0* test/schemas/restriction-attr1_0* test/schemas/seq-dubl-elem1_0* test/schemas/xml.xsd test/schemas/xsd-list-itemType_0*: Added new tests and missing files. Fri Aug 20 18:51:36 CEST 2004 Daniel Veillard * Makefile.am configure.in: a bit of cleanup and a extra variable for CVS dist Thu Aug 19 07:44:07 MDT 2004 John Fleck * doc/xmllint.xml, xmllint.1, xmllint.html: Edit and rebuild the man pages with Daniel's C14 update Wed Aug 18 19:15:27 PDT 2004 William Brack * parser.c: fixed missing line numbers on entity as reported on Yک~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'_| the list by Steve Cheng Wed Aug 18 14:04:31 PDT 2004 William Brack * configure.in globals.c include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in: added some code to include the CVS ChangeLog version in the xmlParserVersion string (printed by xmllint with --version) Wed Aug 18 11:14:06 CEST 2004 Daniel Veillard * xmlschemas.c include/libxml/xmlschemas.h python/generator.py python/libxml.c python/libxml_wrap.h python/types.c python/tests/schema.py python/tests/Makefile.am: Applied patch from Torkel Lyng to add Schemas support to the Python bindings and extend the schemas error API, registered a new test. * doc/* elfgcchack.h: rebuilt to regenerate the bindings Mon Aug 16 14:36:25 CEST 2004 Daniel Veillard * debugXML.c: added help for new set shell command * xinclude.c xmllint.c xmlreader.c include/libxml/parser.h: added parser option to not generate XInclude start/end nodes, added a specific option to xmllint to test it fixes #130769 * Makefile.am: regression test the new feature * doc/xmllint.1 doc/xmllint.xml: updated man page to document option. Mon Aug 16 02:42:30 CEST 2004 Daniel Veillard * xmlIO.c: small typo pointed out by Mike Hommey * doc/xmllint.xml, xmllint.html, xmllint.1: slightly improved the --c14n description, c.f. #144675 . * nanohttp.c nanoftp.c: applied a first simple patch from Mike Hommey for $no_proxy, c.f. #133470 * parserInternals.c include/libxml/parserInternals.h include/libxml/xmlerror.h: cleanup to avoid 'error' identifier in includes #137414 * parser.c SAX2.c debugXML.c include/libxml/parser.h: first version of the inplementation of parsing within the context of a node in the tree #142359, new function xmlParseInNodeContext(), added support at the xmllint --shell level as the "set" function * test/scripts/set* result/scripts/* Makefile.am: extended the script based regression tests to instrument the new function. Sat Aug 14 18:53:08 MDT 2004 John Fleck * doc/xmllint.xml, xmllint.html, xmllint.1: add c14n to man page (man, it's hard to keep up with Daniel!) Sat Aug 14 18:45:38 MDT 2004 John Fleck * doc/xmllint.xml, xmllint.html, xmllint.1: add pattern, walker, maxmem, output and xmlout to man page fixes #144675 Sun Aug 15 00:41:12 CEST 2004 Daniel Veillard * xmllint.c: added a --c14n option to canonicalize the output should close the RFE #143226 Sat Aug 14 23:50:10 CEST 2004 Daniel Veillard * tree.c: Dodji pointed out a bug in xmlGetNodePath() * xmlcatalog.c: applied patch from Albert Chin to add a --no-super-update option to xmlcatalog see #145461 and another patch also from Albert Chin to not crash on -sgml --del without args see #145462 * Makefile.am: applied another patch from Albert Chin to fix a problem with diff on Solaris #145511 * xmlstring.c: fix xmlCheckUTF8() according to the suggestion in bug #148115 * python/libxml.py: apply fix from Marc-Antoine Parent about the errors in libxml(2).py on the node wrapper #135547 Sat Aug 14 13:18:57 CEST 2004 Daniel Veillard * Makefile.am: added a dumb rule to able to compile tst.c when people submit a sample test program * xmlschemas.c: applied small patch from Eric Haszlakiewicz to document xmlSchemasSetValidErrors() limitations, #141827 * error.c: Add information in generic and structured error setter functions that this need to be done per thread #144308 * xmlsave.c: fixed bug whith missing NOTATION(s) serialization bug #144162 * doc/xmllint.xml: typo fix #144840 Tue Aug 10 07:19:31 PDT 2004 Daniel Veillard * configure.in xmlregexp.c xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h include/libxml/xmlerror.h include/libxml/xmlschemastypes.h: applied Schemas patches from Kasimier Buchcik * test/ result/ bug141333* annot-err* any[1-4]* bug145246* element-err* element-minmax-err* include1* restrict-CT-attr-ref*: lot of new tests for things fixed by the patch Fri Aug 6 09:22:34 PDT 2004 William Brack * valid.c: fixed my mis-handling of External ID on last change. Wed Aug 4 23:40:21 PDT 2004 William Brack * valid.c: changed the parsing of a document's DTD to use the proper base path (bug 144366) Wed Aug 4 16:58:08 CEST 2004 Daniel Veillard * Makefile.am config.h.in configure.in python/Makefile.am: applied a patch from Gerrit P. Haase to get python bindings on Cygwin Tue Aug 3 15:08:22 PDT 2004 William Brack * include/libxml/valid.h: elaborated on description of xmlValidityWarningFunc and xmlValidityErrorFunc (bug 144760) * xmlIO.c, xmlschemastypes.c, include/libxml/schemasinternals.h: minor fixes to comments for doc rebuilding errors. * doc/*.html: rebuilt the docs Tue Aug 3 23:59:23 CEST 2004 Daniel Veillard * doc/ChangeLog.xsl doc/downloads.html doc/xml.html doc/*: fixes documentation glitches raised by Oliver Stoeneberg Tue Aug 3 09:42:31 PDT 2004 William Brack * tree.c: fixed problem with memory leak on text nodes in DTD (bug 148965) with patch provided by Darrell Kindred Tue Aug 3 08:14:44 PDT 2004 William Brack * HTMLparser.c: fixed initialisation problem for htmlReadMemory (bug 149041) Sat Jul 31 11:01:33 PDT 2004 William Brack * doc/buildDocBookCatalog: enhanced per bug 119876. Further info posted to the mailing list. Sat Jul 31 09:12:44 PDT 2004 William Brack * SAX2.c, encoding.c, error.c, parser.c, tree.c, uri.c, xmlIO.c, xmlreader.c, include/libxml/tree.h: many further little changes for OOM problems. Now seems to be getting closer to "ok". * testOOM.c: added code to intercept more errors, found more problems with library. Changed method of flagging / counting errors intercepted. Fri Jul 30 13:57:55 CEST 2004 Daniel Veillard * tree.c: applied a couple of patch one from Oliver Stoeneberg and another one from Rob Richards fixing #148448 Thu Jul 29 13:20:28 CEST 2004 Daniel Veillard * HTMLparser.c: 1 line patch, apparently htmlNewDoc() was not setting doc->charset. Thu Jul 29 00:05:58 PDT 2004 William Brack * SAX2.c, tree.c, uri.c, xmlIO.c, xmlreader.c: further fixes for out of memory condition, mostly from Olivier Andrieu. * testOOM.c: some further improvement by Olivier, with a further small enhancement for easier debugging. Tue Jul 27 00:34:07 PDT 2004 William Brack * SAX2.c, error.c, parser.c, tree.c, xmlreader.c: implemented patches supplied by Olivier Andrieu (bug 148588), plus made some further enhancements, to correct some problems with out of memory conditions. * testOOM.c: improved with patches from Olivier Andrieu Mon Jul 26 11:03:18 PDT 2004 William Brack * tree.c: put in patch for Windows buffer re-allocation submitted by Steve Hay (bug 146697) Sun Jul 25 17:18:39 PDT 2004 William Brack * xinclude.c: added some code to check, when an include is done, whether the requested URL gets mapped to some other location (e.g. with a catalog entry) and, if so, take care of the xml:base properly (bug 146988) Sun Jul 25 14:02:24 PDT 2004 William Brack * error.c: fixed to assure user data param is set correctly when user structured error handler is called (bug 144823) Thu Jul 22 10:14:48 PDT 2004 William Brack * xmlreader.c: fixed problem with reader state after processing attributes (bug 147993) Wed Jul 21 17:04:27 HKT 2004 William Brack * configure.in, Makefile.am: put in an auto* check for the path to perl (if it exists), and modified make Timingtests to use that path instead of just executing the dbgenattr.pl script (bug 148056) Fri Jul 16 18:36:33 HKT 2004 William Brack * python/generator.py: added a check on the argument for some classes (e.g. xmlDoc and xmlNode) to prevent a segfault (as reported on the list). Further enhancement should be done to auto-create the appropriate object. * python/libxml.c: minor fix for a warning message; added a routine, currently not used, to report the description of a PyCObject. * python/libxml2class.txt: regenerated Fri Jul 16 11:01:40 CEST 2004 Daniel Veillard * catalog.c test/catalogs/white* result/catalogs/white*: applied patches from Peter Breitenlohner to fix handling of white space normalization in public ids and add tests Tue Jul 13 17:24:13 CEST 2004 Daniel Veillard * xmlmemory.c: applied a small fix from Steve Hay Tue Jul 13 23:02:19 HKT 2004 William Brack * xpath.c: Added code to in PREDICATE/FILTER handling to reset the xpath context document pointer (part of fix to libxslt bug 147445) Tue Jul 13 00:14:08 HKT 2004 William Brack * python/libxml.py: ran 'expand' on the file to get rid of mixture of tabs and spaces (bug 147424) Sun Jul 11 22:38:29 HKT 2004 William Brack * python/drv_libxml.py: added an encoding "special comment" to avoid warning message in python2.3 (bug 146889) * Makefile.am, python/Makefile.am, python/tests/Makefile.am: small change to make "make tests" a little quieter (MAKEFLAGS+=--silent) * xpath.c: enhanced to take advantage of current libxslt handling of tmpRVT. Fixes bug 145547. Fri Jul 9 14:02:54 CEST 2004 Daniel Veillard * libxml.h uri.c: fixed a couple of problems in the new elfgcchack.h trick pointed by Peter Breitenlohner Wed Jul 7 00:45:48 CEST 2004 Daniel Veillard * elfgcchack.h doc/apibuild.py doc/libxml2-api.xml: fixed a bug which prevented building with --with-minimum Mon Jul 5 19:43:51 CEST 2004 Daniel Veillard * configure.in doc/*: releasing 2.6.11, updated and regenerated the docs Mon Jul 5 18:43:47 CEST 2004 Daniel Veillard * parser.c: make the push interfaces synchronous * python/tests/sync.py: added a specific test * python/tests/Makefile.am doc/examples/Makefile.am doc/examples/index.py: added the new test, cleaning up "make tests" output Mon Jul 5 15:09:17 CEST 2004 Daniel Veillard * xmlschemas.c: applied patch from Kasimier to fix some Relax-NG datatype facet problem with recent changes. Sat Jul 3 11:31:02 HKT 2004 William Brack * python/libxml.c: Changed the number of XPath extension functions allowed to be variable-length (patch supplied by Marc-Antoine Parent, bug 143805). Added code to "unregister" the functions when the parser cleanup takes place. Fri Jul 2 14:22:14 CEST 2004 Daniel Veillard * xmlmemory.c python/libxml.c python/libxml2-python-api.xml: some updates with memory debugging facilities while messing with libxslt python bindings Thu Jul 1 14:53:36 CEST 2004 Daniel Veillard * python/libxml.c python/generator.py python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt: applied patch from Stphane Bidoul to fix some Python bindings initialization, then had to change the parserCleanup() to handle memory released there. * xmlmemory.c: added more debugging comments. Thu Jul 1 13:18:02 CEST 2004 Daniel Veillard * xmlreader.c: seems the reader buffer could be used while not allocated, fixes bug #145218 Thu Jul 1 11:34:10 CEST 2004 Daniel Veillard * python/generator.py: do not provide functions used as destructor of classes as public methods to avoid double-free problem like in bug #145185 Wed Jun 30 19:45:23 HKT 2004 William Brack * xmlschemas.c, xmlschemastypes.c: warning message cleanup. Now compiles warning-free, all tests passed. * SAX2.c: small change to comments for documentation. No change to logic. Tue Jun 29 15:00:13 PDT 2004 Daniel Veillard * xmlschemas.c: more fixes with Kasimier, looks far cleaner :-) Tue Jun 29 23:00:05 CEST 2004 Daniel Veillard * xmlschemas.c: Kasimier Buchcik fixed the memory access and allocation problem Tue Jun 29 19:00:32 CEST 2004 Daniel Veillard * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h include/libxml/schemasInternals.h include/libxml/xmlschemastypes.h: applied Schemas patches from Kasimier Buchcik, there is still one open issue about referencing freed memory. * test/schemas/* result/schemas/*: updated with new tests from Kasimier Tue Jun 29 14:52:18 CEST 2004 Daniel Veillard * include/libxml/globals.h include/libxml/xmlIO.h doc/libxml2-api.xml doc/libxml2-refs.xml: moved some definitions to globals.h to avoid some troubles pointed out by Rob Richards Mon Jun 28 11:25:31 CEST 2004 Daniel Veillard * libxml.m4: applied changes suggested by Mike Hommey, remove libxml1 support and use CPPFLAGS instead of CFLAGS Sun Jun 27 14:17:15 CEST 2004 Daniel Veillard * libxml.spec.in: another, more 'experimental' feature to get compiler optimization based on gcc runtime profiling Sun Jun 27 14:02:36 CEST 2004 Daniel Veillard * elfgcchack.h doc/elfgcchack.xsl libxml.h: hack based on Arjan van de Ven suggestion to reduce ELF footprint and generated code. Based on aliasing of libraries function to generate direct call instead of indirect ones * doc/libxml2-api.xml doc/Makefile.am doc/apibuild.py: added automatic generation of elfgcchack.h based on the API description, extended the API description to show the conditionals configuration flags required for symbols. * nanohttp.c parser.c xmlsave.c include/libxml/*.h: lot of cleanup * doc/*: regenerated the docs. Sun Jun 27 10:02:28 HKT 2004 William Brack * regressions.py, regressions.xml: new files for running regression tests under Python. Not yet complete, but should provide good testing under both Linux and Windows. * testHTML.c, testSAX.c, xmllint.c: changed the 'fopen' used for --push testing to include the 'rb' param when compiled under Windows. Fri Jun 25 13:38:57 HKT 2004 William Brack * uri.c: fixed a problem when base path was "./xxx" * result/XInclude/*: 5 test results changed by above. * Makefile.am: fixed a couple of spots where a new result file used different flags that the testing one. Thu Jun 24 16:27:44 HKT 2004 William Brack * valid.c: suppressed warnings from within xmlValidGetValidElements (bug 144644) * doc/examples/testWriter.c: corrected typo in comment for ISO-8859-1 (bug 144245) Thu Jun 24 10:17:31 HKT 2004 William Brack * valid.c: implemented bugfix from Massimo Morara for DTD dumping problem. * test/valid/t10.xml, result/valid/t10.*: added regression for above * configure.in: small change for my profile settings Wed Jun 23 20:18:19 MDT 2004 John Fleck * doc/xmlcatalog_man.xml, xmlcatalog.1 Docs patch from Ville Skytta, bugzilla #144841 Sat Jun 19 18:34:11 MDT 2004 John Fleck * doc/xmllint.xml, xmllint.html, xmllint.1 update man page to reflect William's newly disciplined return code mojo Thu Jun 17 00:51:55 CEST 2004 Daniel Veillard * doc/examples/io2.c doc/examples/parse4.c: fixing a couple of compilation errors when configured with --with-minimum Wed Jun 16 16:07:10 CEST 2004 Daniel Veillard * debugXML.c: applied patch from Stefano Debenedetti to register namespaces in the debug shell Mon Jun 14 21:56:31 CEST 2004 Daniel Veillard * xmlreader.c: fix from Steve Ball and update of the comment. * Makefile.am result/errors/*.str: William pointed out that the streaming error checking part wasn't streaming, fixing Mon Jun 14 14:11:52 CEST 2004 Daniel Veillard * catalog.c: patch from Igor for the default catalog path on Windows Sat Jun 12 09:03:57 HKT 2004 William Brack * configure.in: apparently wasn't updated last time Thu Jun 10 20:57:48 HKT 2004 William Brack * configure.in, xmlmemory.c, globals.c: fixed problem when configuring using --with-thread-alloc Wed Jun 9 16:31:24 CEST 2004 Igor Zlatkovic * win32/configure.js win32/Makefile.* minor changes for the new layout of the Windows binary package Tue Jun 8 19:50:25 CEST 2004 Daniel Veillard * xmlschemas.c include/libxml/xmlerror.h: applied another patch from Kasimier Buchcik for Schema Component Constraints * test/schemas/* result/schemas/*: added the regression tests Tue Jun 8 21:27:03 HKT 2004 William Brack * xmllint.c: fixed missing error return code for schema validation (bug 143880), also changed over to an enum for defining the error return codes for all conditions. Tue Jun 8 14:01:14 CEST 2004 Daniel Veillard * parser.c xmlreader.c include/libxml/parser.h: fixed a serious problem when substituing entities using the Reader, the entities content might be freed and if rereferenced would crash * Makefile.am test/* result/*: added a new test case and a new test operation for the reader with substitution of entities. Tue Jun 8 12:14:16 CEST 2004 Daniel Veillard * globals.c xmlIO.c include/libxml/globals.h include/libxml/xmlIO.h: applied patch from Rob Richards for the per thread I/O mappings Tue Jun 8 09:58:31 HKT 2004 William Brack * xinclude.c: some further enhancement to take care of xml:base for XPointer elements (bug 143886). Also fixed a problem when xml:base was already specified on an XInclude'd element. Mon Jun 7 22:14:58 HKT 2004 William Brack * relaxng.c: fixed a problem with internal cleanup of
element (bug 143738). Mon Jun 7 16:57:43 HKT 2004 William Brack * uri.c, include/libxml/uri.h: added a new routine xmlBuildRelativeURI needed for enhancement of xinclude.c * xinclude.c: changed handling of xml:base (bug 135864) * result/XInclude/*: results of 5 tests changed as a result of the above change Fri Jun 4 11:27:37 CEST 2004 Daniel Veillard * test/schemas/* result/schemas/*: added a bunch of tests from Kasimier Buchcik posted on May 11 Thu Jun 3 17:58:25 CEST 2004 Daniel Veillard * xmlschemas.c: new patch from Kasimier Buchcik for processContents of wildcards attribute handling * test/schemas/anyAttr-* result/schemas/anyAttr-*: added specific regression tests Thu Jun 3 13:20:36 CEST 2004 Daniel Veillard * parser.c: fixed a bug where invalid charrefs may not be detected sometimes as pointed by Morus Walter. * test/errors/charref1.xm result/errors/charref1.xml*: added the test in the regression suite. Thu Jun 3 18:38:27 HKT 2004 William Brack * xmlschemas.c: small change to xmlSchemaValidateAttributes, also corrected typo on error code enum. * include/libxml/xmlerror.h: corrected typo on schema error code enum Thu Jun 3 10:12:38 HKT 2004 William Brack * xmlschemas.c: minor cosmetic changes, no change to logic. * result/schemas/attruse_0_[12].err: regenerated * globals.c: added a newline at end to make gcc happy Wed Jun 2 21:16:26 CEST 2004 Daniel Veillard * xmlschemas.c include/libxml/schemasInternals.h include/libxml/xmlerror.h: applied a patch from Kasimier Buchcik implementing attribute uses and wildcards. * test/schemas/* result/schemas/*: added/fixed a bunch of tests Wed Jun 2 18:15:51 CEST 2004 Daniel Veillard * globals.c xmlIO.c include/libxml/globals.h: applied patch from Rob Richards for custom I/O BufferCreateFilenane fixes bug #143366 Wed Jun 02 16:25:32 HKT 2004 William Brack * xpath.c: fixed problem with predicate evaluation on an empty nodeset (bug 143409) Wed Jun 02 11:26:41 HKT 2004 William Brack * testSAX.c: fixed problem with attribute listing (bug 142674) and added macro LIBXML_TEST_VERSION to assure xmlInitParser gets called (bug 142686) Sat May 29 21:35:52 CEST 2004 Daniel Veillard * test/schemas/date_0.xml xmlschemastypes.c: applied a patch from Charles Bozeman fixing a side effect in date handling Thu May 27 19:47:48 MDT 2004 John Fleck * doc/tutorial/xmltutorial.xml fix lack of cast in Xpath example * doc/tutorial/*.html, xmltutorial.pdf rebuild html, pdf 2004-05-25 Aleksey Sanin * c14n.c: fixed c14n bug with serializing attribute namespaces Mon May 24 08:22:48 HKT 2004 William Brack * xpath.c: fixed to allow '+' in exponent of number (bug 143005) * SAX2.c: fixed typo in last commit Sat May 22 09:08:24 HKT 2004 William Brack * SAX2.c: skipped call to xmlValidateNCName when compiling --with-minimum (bug 142917) Tue May 18 06:48:00 CEST 2004 Daniel Veillard * catalog.c: reverted the broken change. Mon May 17 23:07:15 CEST 2004 Daniel Veillard * NEWS doc/*: updated the docs for 2.6.10 Mon May 17 05:52:03 CEST 2004 Daniel Veillard * configure.in : releasing 2.6.10 Sun May 16 23:12:35 CEST 2004 Daniel Veillard * tree.c: avoid returning default namespace when searching from an attribute * entities.c xmlwriter.c: reverse xmlEncodeSpecialChars() behaviour back to escaping " since the normal serialization routines do not use it anymore, should close bug #134477 . Tried to make the writer avoid it too but it didn't work. Sun May 16 01:07:16 CEST 2004 Daniel Veillard * doc/ChangeLog.awk doc/ChangeLog.xsl: fixed escaping handling and added direct links to bugzilla report for bug numbers. Sun May 16 11:11:13 HKT 2004 William Brack * error.c: modified to assure proper user data is sent to structured error routine (bug 142598) Sun May 16 03:18:52 CEST 2004 Daniel Veillard * catalog.c: a couple of large static variable which should really not be declared as such cluttered the .bss section. Sun May 16 03:06:31 CEST 2004 Daniel Veillard * doc/ChangeLog.awk: fixed a couple of problems when parsing libxslt ChangeLog Sat May 15 20:14:21 CEST 2004 Daniel Veillard * doc/ChangeLog.awk doc/ChangeLog.xsl: first steps of a good ChangeLog page generation. The awk shoudl escape characters not okay in XML and the xslt should make links to functions or variables or bug reported in the entries. Sat May 15 14:57:40 CEST 2004 Daniel Veillard * xmlsave.c include/libxml/xmlsave.h: start adding API for escaping customization. Sat May 15 12:38:17 CEST 2004 Daniel Veillard * xmlsave.c: more xmlSave cleanup, optimization and refactoring Fri May 14 17:51:48 CEST 2004 Daniel Veillard * xmlIO.c xmlsave.c: third pass at the escaping refactoring. Fri May 14 12:37:24 HKT 2004 William Brack * parser.c: enhanced the enhancement, fixed another couple of special cases. Fri May 14 11:48:33 HKT 2004 William Brack * parser.c: small enhancement to dtd handling of (a?)+ (bug 142487) Thu May 13 23:19:00 CEST 2004 Daniel Veillard * xmlIO.c xmlsave.c include/libxml/xmlIO.h: second pass on escaping handling, start to looks better, need to be completed and added directly at the saving context level. Thu May 13 10:31:28 CEST 2004 Daniel Veillard * xmlIO.c xmlsave.c include/libxml/xmlIO.h: first pass at refactoring the escape on save routines for better performances (less malloc) and more flexibility using the new saving context. Preliminary work, interface will change. Wed May 12 22:34:03 HKT 2004 William Brack * xmlschemas.c: added code in xmlSchemaBuildAContentModel to handle element reference within the xs:all construct (bug 139897) Wed May 12 17:27:18 HKT 2004 William Brack * xinclude.c: a little further fixing of fallback processing, this time for fallback with children (bug 139520). Wed May 12 08:21:33 HKT 2004 William Brack * xmlschemas.c: added code in xmlSchemaBuildContentModel to allow ref in group definition (bug 134411). Also fixed misc compilation warning messages. * result/schema/group0_0_0, result/schema/group0_0_0.err: regenerated (now no error reported). Tue May 11 11:55:59 CEST 2004 Daniel Veillard * xmlIO.c: fix to the fix for #141864 from Paul Elseth * HTMLparser.c result/HTML/doc3.htm: apply fix from David Gatwood for #141195 about text between comments. Tue May 11 23:04:47 HKT 2004 William Brack * xmlschemas.c, include/libxml/schemasInternals.h, include/libxml/xmlerror.h: Applied patches supplied by Kasimier Buchcik. * test/schemas/po1_0.xml, test/schemas/po1_0.xsd: changed test to account for above patch. Tue May 11 09:06:53 CEST 2004 Daniel Veillard * python/tests/tstLastError.py: better portability fix for f(*args), use apply(f, args) as Stephane Bidoul suggested Mon May 10 15:49:22 HKT 2004 William Brack * xmlregexp.c: enhanced xmlRegStateAddTrans to check if transition is already present and, if so, to ignore the request to add it. This has a very dramatic effect on memory requirements as well as efficiency. It also fixes bug 141762. Sun May 9 20:40:59 CEST 2004 Daniel Veillard * Makefile.am python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Ed Davis to allow "make tests" to work with Python 1.5 Sun May 9 19:46:13 CEST 2004 Daniel Veillard * xmlsave.c: apply fix for XHTML1 formating from Nick Wellnhofer fixes bug #141266 * test/xhtmlcomp result//xhtmlcomp*: added the specific regression test Sun May 9 14:07:21 CEST 2004 Daniel Veillard * Makefile.am: fix for a pedantic make check without make all request Sat May 8 22:56:22 CEST 2004 Daniel Veillard * uri.c xmlIO.c: fixing some problems in URI unescaping and output buffer opening, this should fix #141864 Fri May 7 22:31:54 CEST 2004 Daniel Veillard * valid.c include/libxml/valid.h: fixes the use of 'list' as a parameter * xmlIO.c include/libxml/xmlIO.h: added xmlPopInputCallback for Matt Sergeant Thu May 6 21:14:38 PDT 2004 William Brack * xmlregexp.c: enhanced the handling of subexpression ranges which have a minOccurs of 0 (bug 140478 again); cleaned up comments throughout the module. Tue May 4 00:52:16 CEST 2004 Daniel Veillard * xmllint.c: adding a --maxmem option to check memory used. Sat May 1 01:08:44 CEST 2004 Daniel Veillard * xmllint.c xmlsave.c python/generator.py python/libxml.c: Fixed bug #141529 i.e. various problems when building with --without-html Fri Apr 30 18:12:31 CEST 2004 Daniel Veillard * xmllint.c xmlreader.c: fixing bug #141384 where the reader didn't call the deregistering functions. Also added the check to xmllint --stream --chkregister . Fri Apr 30 08:57:47 CEST 2004 Daniel Veillard * win32/Makefile.msvc: applied a second patch from Mark Vakoc for regression tests on Windows Thu Apr 29 21:47:23 CEST 2004 Daniel Veillard * xmlreader.c: never commit without running make tests first ! Thu Apr 29 20:15:20 CEST 2004 Daniel Veillard * xmlreader.c: fix a nasty problem with reading over the end * xmlsave.c: fix a reported memory leak apparently Thu Apr 29 17:05:00 CEST 2004 Daniel Veillard * win32/Makefile.msvc: patch from Mark Vakoc for regression tests on Windows. * xpath.c: the NaN problem also shows up on Borland Mon Apr 26 23:37:12 HKT 2004 William Brack * xmlregexp.c: enhanced xmlFARegExec range evaluation for min occurs 0 problems - fixes bug 140478. Thu Apr 22 09:12:47 CEST 2004 Daniel Veillard * rngparser.c: tiny path fixes the "xmlConvertCRNGFile" function name from Kasimier Buchcik * xmlschemas.c: recursive xs:extension fix from taihei goi Wed Apr 21 00:19:29 CEST 2004 Daniel Veillard * tree.c: small buffer resizing improvement from Morten Welinder closes #140629 Tue Apr 20 23:40:14 CEST 2004 Daniel Veillard * xpath.c: last version of the fix for MSC version 1200 Tue Apr 20 19:40:37 CEST 2004 Daniel Veillard * parser.c: killing the strncmp vs. memcmp controversy and #140593 Tue Apr 20 13:27:06 CEST 2004 Daniel Veillard * include/libxml/SAX2.h: Kasimier Buchcik pointed out some inexistent functions, cleaned them out. Tue Apr 20 11:42:50 CEST 2004 Daniel Veillard * error.c: Johnson Cameron pointed out that initGenericErrorDefaultFunc() was really wrong. * xmlreader.c include/libxml/xmlreader.h: xmlTextReaderMode enum must be made public, added some missing comments on the XMLReader header. * c14n.c: Alexsey fixed C14N bug with processing namespaces from attributes Mon Apr 19 23:27:46 CEST 2004 Daniel Veillard * xpath.c: fixed a stupid () error + Mark name. Sun Apr 18 23:45:46 CEST 2004 Daniel Veillard * configure.in: preparing 2.6.9 release * doc/* News: updated and rebuilt the docs Sun Apr 18 22:51:43 CEST 2004 Daniel Veillard * xpath.c: relaxed id() to not check taht the name(s) passed are actually NCName, decided this in agreement with Aleksey Sanin since existing specs like Visa3D broke that conformance checking and other tools seems to not implement it sigh... * SAX2.c: check attribute decls for xml:id and the value is an NCName. * test/xmlid/id_err* result/xmlid/id_err*: added error testing Sun Apr 18 21:46:17 CEST 2004 Daniel Veillard * xpath.c: work around Microsoft compiler NaN bug raise reported by Mark Vakoc * xmlschemas.c include/libxml/schemasInternals.h include/libxml/xmlerror.h: fixed a recusive extention schemas compilation error raised by taihei goi Sun Apr 18 16:57:02 CEST 2004 Daniel Veillard * libxml.spec.in: keep the ChangeLog compressed * xmlreader.c: fix a segfault when using Close() * python/tests/Makefile.am python/tests/reader8.py: test for the Close() reader API. Sat Apr 17 22:42:13 HKT 2004 William Brack * xmlschemas.c, xmlwriter.c, doc/examples/parse4.c, doc/examples/io2.c: minor warning cleanup (no change to logic) * xinclude: fixed return value for internal function xmlXIncludeLoadFallback (now always 0 or -1) Sat Apr 17 21:32:32 HKT 2004 William Brack * valid.c: small enhancement to fix bug 139791 Fri Apr 16 18:44:47 CEST 2004 Daniel Veillard * xmlschemas.c include/libxml/schemasInternals.h include/libxml/xmlerror.h: applied patches from Kasimier Buchcik for the attribute use support * test/schemas/attruse* result/schemas/attruse*: added the tests to the regression suite. Fri Apr 16 18:22:25 CEST 2004 Daniel Veillard * xmlsave.c: move the TODO as comments as the function while not finished are usable as-is * xmlschemas.c include/libxml/xmlerror.h: patch from Kasimier Buchcik implementing union * test/schemas/union_0_0.x* result/schemas/union_0_0*: added example * python/Makefile.am: applied fix from Mike Hommey Fri Apr 16 23:58:42 HKT 2004 William Brack * parser.c: fixed problem with detecting external dtd encoding (bug 135229). * Makefile.am: minor change to test label Fri Apr 16 16:09:31 HKT 2004 William Brack * xinclude.c: fixed problem causing duplicate fallback execution (bug 139520) * test/XInclude/docs/fallback2.xml result/XInclude/fallback2.*: added testcase Fri Apr 9 23:49:37 CEST 2004 Daniel Veillard * SAX2.c include/libxml/tree.h: adding xml:id draft support * Makefile.am test/xmlid/id_tst* result/xmlid/id_tst*: adding 4 first regression tests Fri Apr 9 11:56:08 CEST 2004 Daniel Veillard * libxml.spec.in: fixing Red Hat bug #120482 , libxml2-python should depend on the version of python used to compile it. Mon Apr 5 09:07:24 CEST 2004 Daniel Veillard * HTMLparser.c: applied patch from James Bursa, frameset should close head. Fri Apr 2 22:02:24 HKT 2004 William Brack * relaxng.c: fixed problem in xmlRelaxNGCompareNameClasses which was causing check-relaxng-test-suite.py test 351 to fail. Fri Apr 2 17:03:48 HKT 2004 William Brack * nanohttp.c: implemented fix for M$ IIS redirect provided by Ian Hummel * relaxng.c: fixed problem with notAllowed compilation (bug 138793) Thu Apr 1 22:07:52 CEST 2004 Daniel Veillard * uri.c: fix for xmlUriEscape on "http://user@somewhere.com" from Mark Vakoc. 2004-04-01 Johan Dahlin * python/.cvsignore: Add generated files, to make cvs silent. Thu Apr 1 12:41:36 CEST 2004 Daniel Veillard * xmlschemas.c: small signed-ness patch from Steve Little Wed Mar 31 17:47:28 CEST 2004 Daniel Veillard * xmlregexp.c: patched a bug in parsing production 1 and 2 of xmlschemas regexp that William pointed out while working on #134120 * test/regexp/branch result/regexp/branch: added a specific regression test Wed Mar 31 09:50:32 HKT 2004 William Brack * Makefile.am: added PYTHONPATH to python tests for Schemas and RelaxNG * test/xsdtest/xsdtestsuite.xml: added testfile for SchemasPythonTests Mon Mar 29 16:56:49 CEST 2004 Daniel Veillard * doc/examples/examples.xsl doc/examples/index.html: added information about compiling on Unix Mon Mar 29 14:18:12 CEST 2004 Daniel Veillard * catalog.c: fixes the comments for xmlCatalogDump and xmlDumpACatalog * doc/*: rebuilt to update Sun Mar 28 18:11:41 CEST 2004 Daniel Veillard * xmlsave.c: optimize indentation based on the new context Sun Mar 28 14:17:10 CEST 2004 Daniel Veillard * doc/examples/xpath2.c doc/examples/xpath2.res: handle and explain a very tricky problem when modifying the tree based on an XPath result query. Sat Mar 27 09:56:14 PST 2004 William Brack * relaxng.c: fixed problem with IS_COMPILABLE flag (bug 130216) Fri Mar 26 18:28:32 CET 2004 Daniel Veillard * parser.c: applied patch from Dave Beckett to correct line number errors when using push with CDATA Fri Mar 26 14:53:58 CET 2004 Daniel Veillard * doc/examples/xpath1.c: added a test template * doc/examples/xpath2.c doc/examples/xpath2.res doc/examples/*: added a new example, and make valgrind target Fri Mar 26 11:47:29 CET 2004 Daniel Veillard * parser.c: apply fix for #136693 Thu Mar 25 20:21:01 MST 2004 John Fleck * doc/examples/io2.c * doc/examples/io2.res add xmlDocDumpMemory example in response to mailing list FAQ (rebuilt xml and html also) Thu Mar 25 10:33:05 CET 2004 Daniel Veillard * debugXML.c testXPath.c xmllint.c xmlschemastypes.c: applied patch from Mark Vakoc avoiding using xmlParse* option and use xmlRead* instead * win32/Makefile.bcb: patch to Borland C++ builder from Eric Zurcher to avoid problems with some pathnames. Tue Mar 23 12:35:08 CET 2004 Daniel Veillard * configure.in doc/* News: preparing 2.6.8 release, updated and rebuilt the docs. * Makefile.am: use valgring fro the new Python based regression tests Mon Mar 22 20:07:27 CET 2004 Daniel Veillard * relaxng.c: remove a memory leak on schemas type facets. * check-relaxng-test-suite.py check-relaxng-test-suite2.py check-xsddata-test-suite.py: reduce verbosity * configure.in Makefile.am: incorporated the Python regressions tests for Relax-NG and Schemas Datatype to "make tests" Mon Mar 22 16:16:18 CET 2004 Daniel Veillard * xmlwriter.c include/libxml/xmlwriter.h doc/* : applied patch from Alfred Mickautsch for better DTD support. * SAX2.c HTMLparser.c parser.c xinclude.c xmllint.c xmlreader.c xmlschemas.c: fixed bug #137867 i.e. fixed properly the way reference counting is handled in the XML parser which had the side effect of removing a lot of hazardous cruft added to try to fix the problems associated as they popped up. * xmlIO.c: FILE * close fixup for stderr/stdout Sun Mar 21 19:19:41 HKT 2004 William Brack * relaxng.c: added an error message when an element is not found within a (bug 126093) Sat Mar 20 22:25:18 HKT 2004 William Brack * xmlregexp.c: enhanced the logic of parsing char groups to better handle initial or ending '-' (bug 135972) Sat Mar 20 19:26:03 HKT 2004 William Brack * relaxng.c: added check for external reference in xmlRelaxNGGetElements (bug 137718) * test/relaxng/rngbug-001.*, result/relaxng/rngbug-001*: added regression test for above Wed Mar 17 16:37:22 HKT 2004 William Brack * nanohttp.c: added a close for the local file descriptor (bug 137474) Mon Mar 15 15:46:59 CET 2004 Daniel Veillard * xmlsave.c: switched the output routines to use the new context. Mon Mar 15 10:37:18 HKT 2004 William Brack * relaxng.c: enhanced to ignore XML_XINCLUDE_START and XML_XINCLUDE_END nodes (bug 137153) Sun Mar 14 13:19:20 CET 2004 Daniel Veillard * xmlschemastypes.c: applied patch from John Belmonte for anyURI. Wed Mar 10 17:22:48 CET 2004 Daniel Veillard * parser.c: fix bug reported by Holger Rauch * test/att8 result/noent/att8 result/att8 result/att8.rdr result/att8.sax: added the test to th regression suite Wed Mar 10 19:42:22 HKT 2004 William Brack * doc/search.php: Minor change for later verson of php requiring $HTTP_GET_VARS. Wed Mar 10 00:12:31 HKT 2004 William Brack * tree.c: Changed the flag to xmlDocCopyNode (and similar routines), previously used only for recursion, to use a value of '2' to indicate copy properties & namespaces, but not children. * xinclude.c: changed the handling of ranges to use the above new facility. Fixes Bug 134268. Tue Mar 9 18:48:51 HKT 2004 William Brack * win32/Makefile.bcb, win32/Makefile.mingw, win32/Makefile.msvc: added new module xmlsave with patch supplied by Eric Zurcher (second attempt - don't know what happened to the first one!) Tue Mar 9 09:59:25 CET 2004 Daniel Veillard * python/libxml.c python/libxml.py: applied patch from Anthony Carrico providing Python bindings for the Canonicalization C14N support. Mon Mar 8 11:12:23 CET 2004 Hagen Moebius * .cvsignore and python/.cvsignore patched Mon Mar 8 22:33:14 HKT 2004 William Brack * xinclude.c: enhanced to assure that if xpointer is called for a document, the XML_PARSE_NOENT flag is set before parsing the included document so that entities will automatically get taken care of. * xpointer.c: corrected code so that, if an XML_ENTITY_REF node is encountered, it will log it and not crash (bug 135713) Sun Mar 7 19:03:48 HKT 2004 William Brack * xinclude.c: modified to make sub-includes inherit the parse flags from the parent document (bug 132597) Fri Mar 5 01:13:22 CET 2004 Daniel Veillard * xmlschemas.c: QName handling fixes for the XML Schemas support from Adam Dickmeiss * test/schemas/po1_0.xsd: also fix the schemas * test/schemas/ns[12]* result/schemas/ns[12]*: added the specific regression tests Thu Mar 4 23:03:02 CET 2004 Daniel Veillard * configure.in doc/Makefile.am include/libxml/Makefile.am: paalied patch from Julio M. Merino Vidal fixing bug #134751 to fix --with-html-dir option. * doc/*: rebuilt fully the docs * doc/html/libxml-xmlsave.html: new file from new header. Thu Mar 4 16:57:50 CET 2004 Daniel Veillard * debugXML.c testHTML.c tree.c doc/examples/*.c include/libxml/xmlsave.h: fixing compilation bug with some options disabled as well as --with-minimum should fix #134695 Thu Mar 4 15:00:45 CET 2004 Daniel Veillard * xmlcatalog.c: allow fallback to URI lookup when SYSTEM fails, should close #134092 Thu Mar 4 14:39:38 CET 2004 Daniel Veillard * Makefile.am tree.c xmlsave.c include/libxml/xmlsave.h: commiting the new xmlsave module before the actuall big code change. Thu Mar 4 12:38:53 CET 2004 Daniel Veillard * xmlschemas.c: applied patch from Adam Dickmeiss for mixed content * test/schemas/mixed* result/schemas/mixed*: added his regression tests too. Mon Mar 1 15:22:06 CET 2004 Daniel Veillard * testSAX.c: fix a compilation problem about a missing timb include Sat Feb 28 22:35:32 HKT 2004 William Brack * testSAX.c: small enhancement to prevent trying to print strings with null pointers (caused "make tests" errors on HP-UX) Thu Feb 26 20:19:40 MST 2004 John Fleck * doc/xmllint.xml * doc/xmllint.1 * doc/xmllint.html * doc/xmlcatalog_man.xml * doc/xmlcatalog.1 * doc/xmlcatalog_man.html applying patch from Mike Hommey to clarify XML_CATALOG_FILES use Thu Feb 26 23:47:43 CET 2004 Daniel Veillard * Makefile.am: patch for cross-compilation to Windows from Christophe de VIENNE. Thu Feb 26 18:52:11 HKT 2004 William Brack * doc/*.html, doc/html/*.html: regenerated docs using older version of xsltproc pending resolution of AVT problem Thu Feb 26 10:56:29 CET 2004 Daniel Veillard * Makefile.am: applied patch from Charles Bozeman to not use the system xmllint. Wed Feb 25 18:07:05 CET 2004 Daniel Veillard * include/libxml/xmlexports.h: applied patch from Roland Schwingel for MingW Wed Feb 25 13:57:25 CET 2004 Daniel Veillard * Makefile.am catalog.c configure.in: applied a cleanup patch from Peter Breitenlohner * tree.c: removed a doc build warning by fixing a param comment * doc/* : rebuilt the docs Wed Feb 25 13:33:07 CET 2004 Daniel Veillard * valid.c HTMLparser.c: avoid ID error message if using HTML_PARSE_NOERROR should fix #130762 Wed Feb 25 12:50:53 CET 2004 Daniel Veillard * debugXML.c relaxng.c valid.c xinclude.c xmllint.c xmlreader.c: fixing compilation and link option when configuring with --without-valid should fix #135309 Wed Feb 25 11:36:06 CET 2004 Daniel Veillard * catalog.c: fixed the main issues reported by Peter Breitenlohner * parser.c: cleanup * valid.c: speedup patch from Petr Pajas Wed Feb 25 16:07:14 HKT 2004 William Brack * xpath.c: fixed a memory leak (xmlXPathLangFunction) reported on the list by Mike Hommey Mon Feb 23 17:28:34 CET 2004 Daniel Veillard * doc/* NEWS configure.in: preparing 2.6.7 release, updated and rebuilt the documentation. Mon Feb 23 11:52:12 CET 2004 Daniel Veillard * python/tests/*.py: applied patch from Malcolm Tredinnick to avoid tabs in python sources, should fix #135095 Sun Feb 22 23:16:23 CET 2004 Daniel Veillard * testSAX.c: add --timing option * relaxng.c: use the psvi field of the nodes instead of _private which may be used for other purposes. Sat Feb 21 16:57:48 CET 2004 Daniel Veillard * encoding.c: small patch to try to fix a warning with Sun One compiler Sat Feb 21 16:22:35 CET 2004 Daniel Veillard * encoding.c: small patch removing a warning with MS compiler. Sat Feb 21 13:52:30 CET 2004 Daniel Veillard * debugXML.c: added "relaxng" option to the debugging shell * Makefile.am test/errors/* result/errors/*: some regression tests for some error tests cases. Fri Feb 20 09:56:47 CET 2004 Daniel Veillard * tree.c: xmlAttrSerializeTxtContent don't segfault if NULL is passed. * test/att7 result//att7*: adding an old regression test laying around on my laptop Thu Feb 19 17:33:36 CET 2004 Daniel Veillard * xmlreader.c: fixed xmllint --memory --stream memory consumption on large file by using xmlParserInputBufferCreateStatic() with the mmap'ed file Thu Feb 19 13:56:53 CET 2004 Daniel Veillard * tree.c: some clarification in xmlDocDumpMemory() documentation * xmllint.c: fixed xmllint --stream --timing to get timings back Wed Feb 18 15:20:42 CET 2004 Daniel Veillard * parser.c: fixed a problem in push mode when attribute contains unescaped '>' characters, fixes bug #134566 * test/att6 result//att6*: added the test to the regression suite Tue Feb 17 17:26:31 CET 2004 Daniel Veillard * valid.c: removing a non-linear behaviour from ID/IDREF raised by Petr Pajas. Call xmlListAppend instead of xmlListInsert in xmlAddRef Tue Feb 17 13:27:27 CET 2004 Daniel Veillard * python/tests/indexes.py python/tests/reader.py: indicated encoding of the test file, needed for python 2.3 Tue Feb 17 21:08:11 HKT 2004 William Brack * xpath.c: fixed problem with numbers having > 19 fractional places (bug 133921) Tue Feb 17 12:47:20 CET 2004 Daniel Veillard * xpath.c: applied optimization patch from Petr Pajas Tue Feb 17 12:39:08 CET 2004 Daniel Veillard * xmlwriter.c include/libxml/xmlwriter.h: applied update from Alfred Mickautsch and the added patch from Lucas Brasilino Sun Feb 15 12:01:30 CET 2004 Daniel Veillard * benchmark.png index.html xml.html: updating the benchmark graph and using a PNG instead of a GIF * xmlreader.c: updated the TODO Sat Feb 14 18:55:40 MST 2004 John Fleck * doc/tutorial/xmltutorial.xml * doc/tutorial/xmltutorial.pdf * doc/tutorial/*.html Fix bug in XPath example in the tutorial, thanks to Carlos, whose last name I don't know, for pointing this out Thu Feb 12 16:28:12 CET 2004 Daniel Veillard * NEWS configure.in: preparing release of 2.6.6 * doc/*: updated the docs and rebuilt them Thu Feb 12 13:41:16 CET 2004 Daniel Veillard * xmlregexp.c: fixing bug #132930 with the provided patch, a bit suspicious about it but this is fairly contained and regression tests still passes. * test/schemas/all1* result/schemas/all1*: added the test to the regression suite. Thu Feb 12 12:54:26 CET 2004 Daniel Veillard * parser.c: fixed bug #132575 about finding the end of the internal subset in push mode. * test/intsubset.xml result/intsubset.xml* result/noent/intsubset.xml: added the test to the regression suite Wed Feb 11 14:19:31 CET 2004 Daniel Veillard * parserInternals.c xmlIO.c encoding.c include/libxml/parser.h include/libxml/xmlIO.h: added xmlByteConsumed() interface * doc/*: updated the benchmark rebuilt the docs * python/tests/Makefile.am python/tests/indexes.py: added a specific regression test for xmlByteConsumed() * include/libxml/encoding.h rngparser.c tree.c: small cleanups Wed Feb 11 08:13:58 HKT 2004 William Brack * encoding.c: applied patch supplied by Christophe Dubach to fix problem with --with-minimum configuration (bug 133773) * nanoftp.c: fixed potential buffer overflow problem, similar to fix just applied to nanohttp.c. Mon Feb 9 18:40:21 CET 2004 Igor Zlatkovic * nanohttp.c: fixed the fix for the buffer overflow, thanx William :-) Mon Feb 9 22:37:14 HKT 2004 William Brack * acinclude.m4, configure.in: fixed problem concerning determining SOCKLEN_T as pointed out by Daniel Richard G. on the mailing list Mon Feb 9 15:31:24 CET 2004 Igor Zlatkovic * nanohttp.c: fixed buffer overflow reported by Yuuichi Teranishi Mon Feb 9 13:45:59 CET 2004 Daniel Veillard * xpath.c: small patch from Philip Ludlam to avoid warnings. Mon Feb 9 13:41:47 CET 2004 Daniel Veillard * encoding.c: applied a small patch from Alfred Mickautsch to avoid an out of bound error in isolat1ToUTF8() Mon Feb 9 13:35:50 CET 2004 Daniel Veillard * xinclude.c: remove the warning on the 2001 namespace * parser.c parserInternals.c xpath.c: remove some warnings when compiling with MSVC6 * nanohttp.c: applied a patch when using _WINSOCKAPI_ Sun Feb 8 12:09:55 HKT 2004 William Brack * xinclude.c: added a small hack to fix interference between my fixes for bugs 132585 and 132588. * python/libxml.c: fixed problem with serialization of namespace reported on the mailing list by Anthony Carrico Sat Feb 7 16:53:11 HKT 2004 William Brack * xinclude.c: fixed problem with function xmlXIncludeCopyRange (bug 133686). Fri Feb 6 21:03:41 HKT 2004 William Brack * xmlwriter.c: fixed problem with return value of xmlTextWriterWriteIndent() (bug 133297) Fri Feb 6 19:07:04 HKT 2004 William Brack * xinclude.c: changed coding to output good XIncludes when one or more bad ones are present (bug 132588) Fri Feb 6 17:34:21 HKT 2004 William Brack * xinclude.c: corrected handling of empty fallback condition (bug 132585) Fri Feb 6 15:28:36 HKT 2004 William Brack * HTMLparser.c: added initialisation for ctxt->vctxt in HTMLInitParser (bug 133127) * valid.c: minor cosmetic change (removed ATTRIBUTE_UNUSED from several function params) Tue Feb 3 16:48:57 PST 2004 William Brack * xinclude.c: fixed problem regarding freeing of dictionary when there are errors within an XInclude file (bug 133106). Thanks to Oleg Paraschenko for the assistance. Tue Feb 3 09:53:18 PST 2004 William Brack * xmlschemastypes.c: fixed validation of maxLength with no content using patch submitted by Eric Haszlakiewicz (bug 133259) Tue Feb 3 09:21:09 CET 2004 Igor Zlatkovic * include/libxml/xmlreader.h include/libxml/xmlmemory.h: added calling convention to the public function prototypes (rep by Cameron Johnson) * include/libxml/xmlexports.h: fixed mingw+msys compilation (rep by Mikhail Grushinskiy) Mon Feb 2 20:22:18 PST 2004 William Brack * xmlwriter.c: enhanced output indenting (bug 133264) Mon Feb 2 16:13:33 PST 2004 William Brack * xmlreader.c, include/libxml/xmlreader.h: applied patch from Steve Ball to provide structured error reports. Sun Feb 1 01:48:14 PST 2004 William Brack * tree.c, include/libxml/tree.h: moved serialization of attribute text data (xmlSerializeContent) into a separate routine (xmlSerializeTxtContent) so it can be used by xmlwriter.c * xmlwriter.c: changed handling of attribute string to use the routine above (fixed bug 131548) Sat Jan 31 08:22:02 MST 2004 John Fleck 2.6, rebuild html - this time doing it correctly :-) Fri Jan 30 20:45:36 MST 2004 John Fleck * doc/examples/examples.xml * doc/examples/*.html add note that reader examples need libmxl2 > 2.6, rebuild html Thu Jan 29 23:51:48 PST 2004 William Brack * xpath.c: added (void *) type override to prevent warning on Solaris (Bug 132671) Wed Jan 28 07:20:37 MST 2004 John Fleck * doc/examples/Makefile.am per Jan. 15 email to the list from oliverst, the index.html file from this directory wasn't making it into the tarball Mon Jan 26 18:01:00 CET 2004 Daniel Veillard * acinclude.m4: applied fix from Alexander Winston for a problem related to automake-1.8 , c.f. #132513 and #129861 Mon Jan 26 12:53:11 CET 2004 Daniel Veillard * doc/examples/index.py: don't rely on . being on the path for make tests, should keep Mr. Crozat quiet until next time... Sun Jan 25 21:45:03 CET 2004 Daniel Veillard * configure.in NEWS doc/*: preparing release 2.6.5, rebuilt the docs, checked rngparser stuff does not end up in the tarball Sun Jan 25 20:59:20 CET 2004 Daniel Veillard * python/libxml.c: applied patch from Frederic Peters fixing the wrong arg order in xpath callback in bug #130980 Sun Jan 25 20:52:09 CET 2004 Daniel Veillard * xinclude.c: fixing #130453 XInclude element with no href attribute * relaxng.c rngparser.c include/libxml2/relaxng.h: fully integrating the compact syntax will require more work, postponed for the 2.6.5 release. Sat Jan 24 09:30:22 CET 2004 Daniel Veillard * include/libxml/schemasInternals.h xmlschemas.c: applied patch from Steve Ball to avoid a double-free. Fri Jan 23 14:03:21 CET 2004 Daniel Veillard * doc/examples/*: added io1.c an example ox xmlIO usage and io1.res test result, fixed a awful lot of memory leaks showing up in testWriter.c, changed the examples and the Makefiles to test memory leaks. * xmlwriter.c: fixed a memory leak * Makefile.am: run the doc/examples regression tests as part of make tests * xpath.c include/libxml/xpath.h: added xmlXPathCtxtCompile() to compile an XPath expression within a context, currently the goal is to be able to reuse the XSLT stylesheet dictionnary, but this opens the door to others possible optimizations. * dict.c include/libxml/dict.h: added xmlDictCreateSub() which allows to build a new dictionnary based on another read-only dictionnary. This is needed for XSLT to keep the stylesheet dictionnary read-only while being able to reuse the strings for the transformation dictionnary. * xinclude.c: fixed a dictionnar reference counting problem occuring when document parsing failed. * testSAX.c: adding option --repeat for timing 100times the parsing * doc/* : rebuilt all the docs Thu Jan 22 14:17:05 2004 Aleksey Sanin * xmlmemory.c: make xmlReallocLoc() accept NULL pointer Thu Jan 22 08:26:20 CET 2004 Daniel Veillard * xmlschemastypes.c: applied patch from John Belmonte for normalizedString datatype support. Thu Jan 22 10:43:22 HKT 2004 William Brack * xpath.c: fixed problem with union when last() is used in predicate (bug #131971) * xpointer.c: minor change to comment for doc generation Wed Jan 21 17:03:17 CET 2004 Daniel Veillard * parser.c: fixed bug #131745 raised by Shaun McCance with the suggested patch Wed Jan 21 10:59:55 CET 2004 Daniel Veillard * xmlwriter.c: applied patch from Alfred Mickautsch fixing a memory leak reported on the list. Thu Jan 15 00:48:46 CET 2004 Daniel Veillard * python/generator.py python/tests/tstLastError.py: applied patch from Stephane Bidoul to add enums to the Python bindings. Tue Jan 13 21:50:05 CET 2004 Daniel Veillard * testHTML.c: another small patch from Mark Vakoc Tue Jan 13 21:39:58 CET 2004 Daniel Veillard * HTMLparser.c relaxng.c testRelax.c testSchemas.c: applied patch from Mark Vakoc to not use SAX1 unless necessary. Mon Jan 12 17:22:57 CET 2004 Daniel Veillard * dict.c parser.c xmlstring.c: some parser optimizations, xmllint --memory --timing --repeat --stream ./db10000.xml went down from 16.5 secs to 15.5 secs. Thu Jan 8 17:57:50 CET 2004 Daniel Veillard * xmlschemas.c: removed a memory leak remaining from the switch to a dictionnary for string allocations c.f. #130891 Thu Jan 8 17:48:46 CET 2004 Daniel Veillard * xmlreader.c: fixing some problem if configured --without-xinclude c.f. #130902 Thu Jan 8 17:42:48 CET 2004 Daniel Veillard * configure.in: changed AC_OUTPUT() macro to avoid a cygwin problem c.f. #130896 Thu Jan 8 00:36:00 CET 2004 Daniel Veillard * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc: applying patch from Mark Vakoc for Windows * doc/catalog.html doc/encoding.html doc/xml.html: applied doc fixes from Sven Zimmerman Tue Jan 6 23:51:46 CET 2004 Daniel Veillard * python/libxml2-python-api.xml python/libxml_wrap.h python/types.c python/tests/Makefile.am python/tests/tstLastError.py: applied patch from Stephane Bidoul for structured error handling from python, and the associated test Tue Jan 6 23:18:11 HKT 2004 William Brack * configure.in: fixed Bug130593 * xmlwriter.c: fixed compilation warning Tue Jan 6 15:15:23 CET 2004 Daniel Veillard * include/libxml/xmlstring.h: fixed the comment in the header * doc/*: rebuilt the docs Tue Jan 6 19:40:04 HKT 2004 William Brack * encoding.c, parser.c, xmlstring.c, Makefile.am, include/libxml/Makefile.am, include/libxml/catalog.c, include/libxml/chvalid.h, include/libxml/encoding.h, include/libxml/parser.h, include/libxml/relaxng.h, include/libxml/tree.h, include/libxml/xmlwriter.h, include/libxml/xmlstring.h: moved string and UTF8 routines out of parser.c and encoding.c into a new module xmlstring.c with include file include/libxml/xmlstring.h mostly using patches from Reid Spencer. Since xmlChar now defined in xmlstring.h, several include files needed to have a #include added for safety. * doc/apibuild.py: added some additional sorting for various references displayed in the APIxxx.html files. Rebuilt the docs, and also added new file for xmlstring module. * configure.in: small addition to help my testing; no effect on normal usage. * doc/search.php: added $_GET[query] so that persistent globals can be disabled (for recent versions of PHP) Mon Jan 5 20:47:07 MST 2004 John Fleck * doc/tutorial/customfo.xsl * doc/tutorial/customhtml.xsl update custom tutorial-building stylesheets in preparation for tutorial update Tue Jan 6 00:10:33 CET 2004 Daniel Veillard * rngparser.c: commiting the compact relax ng parser. It's not completely finished, it's not integrated but I want to save the current state Mon Jan 5 22:22:48 HKT 2004 William Brack * doc/apibuild.py, doc/APIconstructors.html, doc/libxml2-refs.xml, win32/libxml2.def.src: fixed apibuild.py's generation of "constructors" to be in alphabetical order (instead of previous random sequence); regenerated resulting files. Mon Jan 5 14:03:59 CET 2004 Daniel Veillard * xmlwriter.c: applied patch from Lucas Brasilino fixing an indent problem. Sun Jan 4 18:54:29 MST 2004 John Fleck * doc/newapi.xsl: change background color of function declaration to improve readability * doc/*: rebuild docs with new stylesheet Sun Jan 4 22:45:14 HKT 2004 William Brack * parser.c, include/libxml/parser.h: added a routine xmlStrncatNew to create a new string from 2 frags. * tree.c: added code to check if node content is from dictionary before trying to change or concatenate. Sun Jan 4 08:57:51 HKT 2004 William Brack * xmlmemory.c: applied suggestion from Miloslav Trmac (see Bug 130419) and eliminated xmlInitMemoryDone. More improvement needed. * xml2-config.in: added an additional flag (--exec-prefix) to allow library directory to be different from include directory (Bug 129558). Fri Jan 2 21:22:18 CET 2004 Daniel Veillard * error.c: applied patch from Stphane Bidoul for structured error reporting. Fri Jan 2 21:03:17 CET 2004 Daniel Veillard * include/libxml/xmlwriter.h xmlwriter.c: applied the patch from Lucas Brasilino to add indentation support to xmlWriter Fri Jan 2 22:58:29 HKT 2004 William Brack * xinclude.c: fixed problem with "recursive" include (fallback contains another include - Bug 129969) Fri Jan 2 11:40:06 CET 2004 Daniel Veillard * SAX2.c: found and fixed a bug misallocating some non blank text node strings from the dictionnary. * xmlmemory.c: fixed a problem with the memory debug mutex release. Wed Dec 31 22:02:37 HKT 2003 William Brack * xinclude.c: fixed problem caused by wrong dictionary reference count, reported on the list by Christopher Grayce. Wed Dec 31 15:55:55 HKT 2003 William Brack * python/generator.py, python/libxml2class.txt: fixed problem pointed out by Stphane Bidoul on the list. * xinclude.c, xpointer.c, xpath.c, include/libxml/xpointer.h: completed modifications required to fix BuD~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'|g 129967 (at last!). Now wait to see how long before further trouble... Tue Dec 30 16:26:13 HKT 2003 William Brack * parser.c, xmlmemory.c, include/libxml/xmlmemory.h: Fixed memory leak reported by Dave Beckett * xmlschemas.c: Removed spurious comment reported on the mailing list * xinclude.c, xpath.c, xpointer.c, libxml/include/xpointer.h: Further work on Bug 129967 concerning xpointer range handling and range-to function; much better, but still not complete Mon Dec 29 18:08:05 CET 2003 Daniel Veillard * valid.c: xmlValidateElement could crash for element holding a namespace declaration but not in a namespace. Oliver Fischer provided the example. Mon Dec 29 11:29:31 CET 2003 Daniel Veillard * xmllint.c: issue validation status on stderr, not stdout as suggested by Pawel Palucha * result/relaxng/*: this change slightly all the output from RNG regressions. Mon Dec 28 10:47:32 HKT 2003 William Brack * xmlschemas.c: edited a couple of comments in accordance with posting on the mailing list (no logic change) * xpointer.c: working on Bug 129967, added check for NULL nodeset to prevent crash. Further work required. * xpath.c: working on Bug 129967, added code to handle XPATH_LOCATIONSET in RANGETO code, also added code to handle it in xmlXPathEvaluatePredicateResult. Further work required. Sat Dec 27 12:32:58 HKT 2003 William Brack * xmlschemas.c: added tests for xs:all to assure minOccurs and maxOccurs <= 1 (Bug 130020) Sat Dec 27 09:53:06 HKT 2003 William Brack * xmlregexp.c: fixed xmlFAParseCharRange for Unicode ranges with patch from Charles Bozeman. Fri Dec 26 14:03:41 HKT 2003 William Brack * xmlregexp.c: fixed problem causing segfault on validation error condition (reported on mailing list) Thu Dec 25 21:16:22 HKT 2003 William Brack * xmlschemas.c: fixed missing dictionaries for Memory and Doc parser contexts (problem reported on mailing list) * doc/apibuild.py: small change to prevent duplicate lines on API functions list. It will take effect the next time the docs are rebuilt. Wed Dec 24 12:54:25 CET 2003 Daniel Veillard * configure.in NEWS doc/*: updated the docs and prepared a new release 2.6.4 Wed Dec 24 12:07:52 CET 2003 Daniel Veillard * legacy.c: remove deprecated warning on startElement() Wed Dec 24 12:04:35 CET 2003 Daniel Veillard * xinclude.c result/XInclude/nodes2.*: XInclude xpointer support was broken with the new namespace. Fixes #129932 Wed Dec 24 00:29:30 CET 2003 Daniel Veillard * xmlschemas.c include/libxml/schemasInternals.h: types might be redefined in includes, quick fix to allow this but lacks the equality of the redefinition test. Tue Dec 23 15:14:37 HKT 2003 William Brack * valid.c: fixed bug concerning validation using external dtd of element with mutiple namespace declarations (Bug 129821) Tue Dec 23 11:41:42 HKT 2003 William Brack * tree.c: inhibited production of "(null):" in xmlGetNodePath when node has default namespace (Bug 129710) Tue Dec 23 09:29:14 HKT 2003 William Brack * xpath.c: small enhancement to xmlXPathCmpNodes to assure document order for attributes is retained (Bug 129331) Mon Dec 22 19:06:16 CET 2003 Daniel Veillard * parser.c xmlreader.c: change xmlReadFd() xmlCtxtReadFd() xmlReaderNewFd() xmlReaderForFd(), change those to not close the file descriptor. Updated the comment, should close #129683 Mon Dec 22 00:34:09 CET 2003 Daniel Veillard * xinclude.c: fixed a serious problem in XInclude #129021 Sun Dec 21 13:59:54 CET 2003 Daniel Veillard * parser.c: fixed bug #129489, propagation of parsing flags in entities. * parser.c xmlreader.c: improved the comments of parsing options Sun Dec 21 18:14:04 HKT 2003 William Brack * python/Makefile.am, python/tests/Makefile.am, doc/Makefile.am: applied fixes to allow build from 'outside' directory (Bug 129172) Sat Dec 20 16:42:07 MST 2003 John Fleck * tree.c - add explanation of namespace inheritance when ns is NULL to xmlNewChild and xmlNewTextChild API doc Sat Dec 20 18:17:28 HKT 2003 William Brack * include/libxml/xpathInternals.h: undid last change (my bad). Put necessary fix in libxslt/libexslt instead. * include/libxml/DOCBparser.h: put test for __GCC__ on warning directive (Bug 129105) Sat Dec 20 10:48:37 HKT 2003 William Brack * include/libxml/xpathInternals.h: fixed xmlXPathReturnString to cater for NULL pointer (bug 129561) * globals.c: added comment to suppress documentation warning * doc/apibuild.py: fixed problem which caused last APIchunkxx.html to be lost. Rebuilt doc/* (including adding APIchunk26.html) Fri Dec 19 18:24:02 CET 2003 Daniel Veillard * xmlreader.c: trying to fix #129692 xmlTextReaderExpand() when using an xmlReaderWalker() Thu Dec 18 20:10:34 MST 2003 John Fleck * tree.c: fix misc. typos in doc comments * include/libxml/tree.h: elaborate on macro define doc comments * doc/*: rebuild docs Wed Dec 17 16:07:33 CET 2003 Daniel Veillard * doc/examples/*: don't call the result files .out but .res as the Makefiles tend to try generating binaries for .out targets... Tue Dec 16 20:53:54 MST 2003 John Fleck * doc/html/libxml-pattern.html: - cvs add API docs for new pattern stuff Tue Dec 16 20:40:40 MST 2003 John Fleck * tree.c * doc/*: Elaborate in documentation discussion of xmlNewChild and xmlNewTextChild. Thanks to Steve Lenti for pointing out the usefulness of a more explicit explanation of the reserved character escaping issue. Fri Dec 12 15:55:15 CET 2003 Daniel Veillard * xmlcatalog.c: applied patch from Stefan Kost Thu Dec 11 15:15:31 CET 2003 Daniel Veillard * doc/examples/testWriter.c: applied small fix from Lucas Brasilino Thu Dec 11 14:55:22 CET 2003 Igor Zlatkovic * win32/Makefile.* win32/configure.js: Added pattern support Wed Dec 10 14:11:20 CET 2003 Daniel Veillard * configure.in doc/* libxml.spec.in: preparing release of libxml2-2.6.3, updated and regenerated the docs. Wed Dec 10 11:43:33 CET 2003 Daniel Veillard * SAX2.c pattern.c: removed some compilation warnings Wed Dec 10 11:16:29 CET 2003 Daniel Veillard * xmllint.c: fixing bug #119264 xmllint failing to report serialization errors in some cases. Tue Dec 9 23:50:23 CET 2003 Daniel Veillard * entities.c: fixed an XML entites content serialization potentially triggered by XInclude, see #126817 Tue Dec 9 16:12:50 CET 2003 Daniel Veillard * xmlwriter.c: applied the patch to xmlTextWriterStartPI() suggested by Daniel Schulman in #128313 Tue Dec 9 15:18:32 CET 2003 Daniel Veillard * configure.in Makefile.am: another patch from Kenneth Haley for Mingw, c.f. #128787 Tue Dec 9 15:07:09 CET 2003 Daniel Veillard * include/libxml/xmlexports.h: applied patch from Kenneth Haley for compiling on Mingw see #128786 Tue Dec 9 14:52:59 CET 2003 Daniel Veillard * xmllint.c: some flags were not passed down correctly as parsing options. Fixes #126806 Tue Dec 9 12:29:26 CET 2003 Daniel Veillard * xinclude.c xmllint.c xmlreader.c include/libxml/xinclude.h include/libxml/xmlerror.h: augmented the XInclude API to be able to pass XML parser flags down to the Inclusion process. Also resynchronized with the Last Call W3C Working Draft 10 November 2003 for the xpointer attribute. * Makefile.am test/XInclude/docs/nodes[23].xml result/XInclude/*: augmented the tests for the new namespace and testing the xpointer attribute, changed the way error messages are tested * doc/*: regenerated the documentation Mon Dec 8 18:38:26 CET 2003 Daniel Veillard * error.c: filter warning messages if the global setting blocks them * xinclude.c xmlreader.c include/libxml/xinclude.h include/libxml/xmlerror.h: updated the change of namespace at the XInclude level, raise a warning if the old one is found, and some cleanup Mon Dec 8 13:09:39 CET 2003 Daniel Veillard * tree.c: tentative fix for #126117 character reference in attributes output problem in some cornercase. Mon Dec 8 11:08:45 CET 2003 Daniel Veillard * python/libxml.py: tried to fix the problems reported in bug #126735 * xpath.c SAX2.c error.c parser.c valid.c include/libxml/xmlerror.h: fixed again some problem trying to use the structured error handlers, c.f. bug #126735 * result/VC/ElementValid: tiny change due to the fix Sun Dec 7 22:27:31 CET 2003 Daniel Veillard * error.c: fixed __xmlRaiseError to use structured error handlers defined by xmlSetStructuredErrorFunc(), fixes bug #126211 Sun Dec 7 20:30:53 CET 2003 Daniel Veillard * parser.c: attempt to fix #126211 ... Fri Dec 5 17:07:29 CET 2003 Daniel Veillard * pattern.c xmlreader.c xmllint.c include/libxml/pattern.h include/libxml/xmlreader.h: fixed the pattern interfaces but not yet the parser to handle the namespaces. * doc/examples/reader3.c doc/*: fixed the example, rebuilt the docs. Fri Dec 5 15:49:44 CET 2003 Daniel Veillard * globals.c xmlwriter.c doc/apibuild.py include/libxml/globals.h include/libxml/pattern.h include/libxml/schemasInternals.h include/libxml/xmlexports.h include/libxml/xmlwriter.h: cleanup the make rebuild in doc, this include new directive to stop documentation warnings * doc/* doc/html/*: rebuilt the docs * pattern.c xmlreader.c include/libxml/pattern.h include/libxml/xmlreader.h: adding xmlTextReaderPreservePattern() to save nodes while scanning the tree with the reader, cleanup the way element were freed, and xmlTextReaderPreserve() implementation, the API might change for namespace binding support when compiling patterns. * doc/examples/*: added reader3.c exposing the xmlTextReaderPreserve() Thu Dec 4 15:10:57 CET 2003 Daniel Veillard * python/libxml.py: oops forgot to modify/commit the new code. Thu Dec 4 13:29:19 CET 2003 Daniel Veillard * python/generator.py python/libxml.c python/libxml_wrap.h: cleanup the output buffer support to at least get the basic to work * python/tests/outbuf.py python/tests/serialize.py: fixes and cleanup. * include/libxml/xmlwriter.h: cleanup Wed Dec 3 21:38:56 MST 2003 John Fleck * include/libxml/xmlversion.h.in * doc/*: add WITH_TRIO comment so it shows up in the docs, rebuild docs Wed Dec 3 13:10:08 CET 2003 Daniel Veillard * config.h.in configure.in xmlregexp.c: fix bug #128401 affecting regexp quantifiers Tue Dec 2 23:29:56 CET 2003 Daniel Veillard * pattern.c include/libxml/pattern.h: adding the pattern node selection code. Inheried in part from libxslt but smaller. * Makefile.am configure.in include/libxml/xmlversion.h.in: integrated the pattern module, made it a configure time option * xmllint.c: added --pattern to test when doing --stream Tue Dec 2 11:25:25 CET 2003 Daniel Veillard * xmlreader.c: fixed a problem in xmlreader validation when streaming exposed by reader2 example. Mon Dec 1 20:40:51 MST 2003 John Fleck * doc/xml.html * doc/docs.html: add reference to the Code Examples page to docs.html list of resources Mon Dec 1 12:30:28 CET 2003 Igor Zlatkovic * win32/Makefile.bcb win32/configure.js: Applied the BCB patch from Eric Sun Nov 30 21:33:37 MST 2003 John Fleck * include/libxml/xinclude.h * doc/*: Add comments for macro definitions in xinclude.h and rebuild the docs Sun Nov 30 21:06:29 MST 2003 John Fleck * doc/docdescr.doc Updating William's explanation of how to build docs, reflecting Daniel's new docs build system Sat Nov 29 18:38:22 HKT 2003 William Brack * xmlmemory.c: enhanced by adding mutex to protect global structures in a multi-threading environment. This fixed some random errors on the Threads regression tests. Fri Nov 28 21:39:49 MST 2003 John Fleck * doc/xml.html doc/python.html: fix tst.py text, which didn't import sys Fri Nov 28 17:28:47 HKT 2003 William Brack * encoding.c, include/libxml/encoding.h: Enhanced the handling of UTF-16, UTF-16LE and UTF-16BE encodings. Now UTF-16 output is handled internally by default, with proper BOM and UTF-16LE encoding. Native UTF-16LE and UTF-16BE encoding will not generate BOM on output, and will be automatically recognized on input. * test/utf16lebom.xml, test/utf16bebom.xml, result/utf16?ebom*: added regression tests for above. Thu Nov 27 19:25:10 CET 2003 Igor Zlatkovic * win32/Makefile.* win32/configure.js: Modified to allow coexistent build with all compilers. Added C-Runtime option for MSVC. Included xmlWriter. * xmlwriter.c: Added IN_LIBXML macro Wed Nov 26 21:54:01 CET 2003 Igor Zlatkovic * win32/Makefile.bcb: applied patch from Eric Wed Nov 26 21:33:14 CET 2003 Daniel Veillard * include/libxml/tree.h: stefan on IRC pointed out that XML_GET_LINE is broken on 2.6.x Tue Nov 25 18:39:44 CET 2003 Daniel Veillard * entities.c: fixed #127877, never output " in element content * result/isolat3 result/slashdot16.xml result/noent/isolat3 result/noent/slashdot16.xml result/valid/REC-xml-19980210.xml result/valid/index.xml result/valid/xlink.xml: this changes the output of a few tests Tue Nov 25 16:36:21 CET 2003 Daniel Veillard * include/libxml/schemasInternals.h include/libxml/xmlerror.h testSchemas.c xmlschemas.c: added xsd:include support, fixed testSchemas behaviour when a schemas failed to parse. * test/schemas/vdv-* result/schemas/vdv-first5_0_0*: added one test for xsd:include from Eric Van der Vlist Tue Nov 25 08:18:12 CET 2003 Daniel Veillard * parser.c: swapped the attribute defaulting and attribute checking parts of parsing a new element start, fixes bug #127772 * result/valid/127772.* test/valid/127772.xml test/valid/dtds/127772.dtd: added the example in the regression tests Tue Nov 25 08:00:15 CET 2003 Daniel Veillard * parser.c: moved xmlCleanupThreads() to the end of xmlCleanupParser() to avoid bug #127851 Mon Nov 24 15:26:21 CET 2003 Daniel Veillard * xmlregexp.c: fixing some Negative Character Group and Character Class Subtraction handling. Mon Nov 24 14:01:57 CET 2003 Daniel Veillard * xmlregexp.c xmlschemas.c: more XML Schemas fixes based on Eric van der Vlist examples * result/schemas/vdv-first4* test/schemas/vdv-first4*: added regression tests * doc/examples/Makefile.am doc/examples/index.py: do not regenerate the index on make all target, but only on make rebuild to avoid troubles. Sat Nov 22 21:35:42 CET 2003 Daniel Veillard * xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h include/libxml/schemasInternals.h: lot of bug fixes, cleanup, starting to add proper namespace support too. * test/schemas/* result/schemas/*: added a number of tests fixed the result from some regression tests too. Fri Nov 21 20:50:59 MST 2003 John Fleck * doc/xml.html, docs.html: remove reference to gtk-doc now that Daniel has removed it, fix link to George's IBM article, other minor edits Fri Nov 21 01:26:00 CET 2003 Daniel Veillard * xmlschemas.c: applied patch from Robert Stepanek to start import os schemas support, cleaned up stuff and the patch. * test/schemas/import0_0.* result/schemas/import0_0_0*: added test to regression, fixed a few regressions too. Thu Nov 20 22:58:00 CET 2003 Daniel Veillard * HTMLparser.c: applied two parsing fixes from James Bursa Thu Nov 20 19:20:46 CET 2003 Daniel Veillard * doc/examples/*: added two xmlReader examples * xmlreader.c: cleaned up some bugs in the process Thu Nov 20 12:54:30 CET 2003 Daniel Veillard * xmlwriter.c include/libxml/xmlwriter.h: applied patch from Alfred Mickautsch, bugfixes and comments * doc/examples/*: added his test as the xmlWriter example * doc/html/ doc/*.html: this resulted in some improvements * include/libxml/hash.h: fixed an inclusion problem when wasn't preceeded by Wed Nov 19 17:19:35 CET 2003 Daniel Veillard * xinclude.c: fix an error message * doc/examples/*: added tree2 example from Lucas Brasilino Wed Nov 19 17:50:47 HKT 2003 William Brack * doc/newapi.xsl: improve the sort sequence for page content * doc/html/*.html: regenerate the web pages Wed Nov 19 00:48:56 CET 2003 Daniel Veillard * Makefile.am: do not package cvs versioning temp files. * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup, slightly improved the API xml format, fixed a lot of small rendering problems * doc/html/libxml*.html: rebuilt Tue Nov 18 21:51:15 CET 2003 Daniel Veillard * include/libxml/*.h include/libxml/*.h.in: modified the file header to add more informations, painful... * genChRanges.py genUnicode.py: updated to generate said changes in headers * doc/apibuild.py: extract headers, add them to libxml2-api.xml * *.html *.xsl *.xml: updated the stylesheets to flag geprecated APIs modules. Updated the stylesheets, some cleanups, regenerated * doc/html/*.html: regenerated added back book1 and libxml-lib.html Tue Nov 18 14:43:16 CET 2003 Daniel Veillard * doc/Makefile.am doc/*.xsl doc/*.html doc/apibuild.py: cleaned up the build process to remove all remains from the old gtk-doc inherited, libxml2-refs.xml is now generated by apibuild.py, the stylesheets have been improved, and the API*html now generated are XHTML1 valid too Tue Nov 18 14:28:32 HKT 2003 William Brack * genChRanges.py, chvalid.c, include/libxml/chvalid.h: minor enhancement to prevent comment with unreferenced variable. * threads.c xmlreader.c xmlwriter.c: edited some comments to improve auto-generation of documentation * apibuild.py: minor change to an error message Mon Nov 17 17:55:51 CET 2003 Daniel Veillard * doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: more cleanup, improving navigation * doc/html/*.html: updated the result Mon Nov 17 14:54:38 CET 2003 Daniel Veillard * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml doc/newapi.xsl: improvement of the stylesheets, fixed a API generation problem, switched the stylesheet and Makefile to build the HTML output. * doc/html/*.html: complete update, ditched some old files, might introduce some breakage... Mon Nov 17 12:50:28 CET 2003 Daniel Veillard * doc/newapi.xsl: lot of improvements, this starts looking good enough to be usable. Mon Nov 17 00:58:09 CET 2003 Daniel Veillard * doc/newapi.xsl: stylesheet to build HTML pages from the API XML description, Work in Progress Sun Nov 16 16:03:24 HKT 2003 William Brack * xpath.c: fixed bug 126976 (string != empty nodeset should be false) Sun Nov 16 14:00:08 HKT 2003 William Brack * doc/html/*.html: Finally - found the problem with the page generation (XMLPUBFUN not recognized by gtkdoc). Re-created the pages using a temporary version of include/libxml/*.h. * testOOMlib.c,include/libxml/encoding.h, include/libxml/schemasInternals.h,include/libxml/valid.h, include/libxml/xlink.h,include/libxml/xmlwin32version.h, include/libxml/xmlwin32version.h.in, include/libxml/xpathInternals.h: minor edit of comments to help automatic documentation generation * doc/docdescr.doc: small elaboration * doc/examples/test1.c,doc/examples/Makefile.am: re-commit (messed up on last try) * xmlreader.c: minor change to clear warning. Sat Nov 15 19:20:32 CET 2003 Daniel Veillard * Copyright: fixed some wording * libxml.spec.in: make sure doc/examples is packaged * include/libxml/tree.h valid.c xmlreader.c: fixed the really annoying problem about xmlRemoveID and xmlReader streaming. Thing looks fixed now, had to add a doc reference to the xmlID structure though... Sat Nov 15 09:53:36 MST 2003 John Fleck * doc/docdescr.doc: added description of man page building Sat Nov 15 19:08:22 HKT 2003 William Brack * doc/html/libxml-chvalid.html, doc/html/libxml-dict.html, doc/html/libxml-list.html, doc/html/libxml-testOOMlib.html, doc/html/libxml-wincecompat, doc/html/winsockcompat.html, doc/html/libxml-xmlexports.html, doc/html/libxml-xmlversion.html, doc/html/libxml-xmlwin32version.html, doc/html/libxml-xmlwriter.html: added missing pages for the website. Sat Nov 15 18:23:48 HKT 2003 William Brack * doc/Makefile.am doc/*.html doc/html/*.html: rebuilt the generated pages (again), manually restored doc/html/index.html and manually edited generated file doc/gnome-xml.xml to put in appropriate headings. * doc/docdescr.doc: new file to describe details of the document generation (helps my memory for the next time) * genChRanges.py,chvalid.c,include/libxml/chvalid.h: minor enhancement to please the automatic documentation generation. Fri Nov 14 23:47:31 HKT 2003 William Brack * catalog.c,relaxng.c,testAutomata.c,xpointer.c,genChRanges.py, chvalid.c,include/libxml/chvalid.h,doc/examples/test1.c: minor error cleanup for gcc-3.3.[12] compilation warnings. Fri Nov 14 15:08:13 HKT 2003 William Brack * tree.c: minor changes to some comments * doc/*.html: rebuilt the generated HTML pages for changes from jfleck (bug 126945) Thu Nov 13 12:44:14 CET 2003 Daniel Veillard * doc/examples/*: added Dodji's example, added output handling Thu Nov 13 11:35:35 CET 2003 Daniel Veillard * doc/examples/*: added Aleksey XPath example, fixed bugs in the indexer Wed Nov 12 23:48:26 CET 2003 Daniel Veillard * doc/*: integrating the examples in the navigation menus * doc/examples/*: added make tests, updated the navigation, added a new test, cleanups, updates. Wed Nov 12 17:50:36 CET 2003 Daniel Veillard * doc/*.html: rebuilt the generated HTML pages * doc/examples/*: updated the stylesheets, added a synopsis, Makefile.am is now generated by index.py Wed Nov 12 01:38:16 CET 2003 Daniel Veillard * doc/site.xsl doc/examples/Makefile.am doc/examples/index.html: added autogeneration of a web page for the examples * doc/examples/example1.c doc/examples/.cvsignore doc/examples/examples.xml doc/examples/index.py: updated the informations extracted, improved the format and indexing. Tue Nov 11 22:08:59 CET 2003 Daniel Veillard * check-xinclude-test-suite.py: less verbose on difference * libxml.spec.in: cleanup * parser.c: fixed xmlCleanupParser() doc * doc/Makefile.am doc/apibuild.py doc/libxml2-api.xml doc/examples/Makefile.am doc/examples/example1.c doc/examples/examples.xml doc/examples/index.py doc/examples/test1.xml: work on adding C examples and generating automated information about those. examples.xml is autogenerated describing the examples. * example/Makefile.am: cleanup Mon Nov 10 23:47:03 HKT 2003 William Brack * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h: fixed missing '-' in block names, enhanced the hack for ABI aliasing. Sun Nov 9 20:28:21 HKT 2003 William Brack * genUnicode.py, xmlunicode.c, include/libxml/xmlunicode.h, python/libxml2class.txt: enhanced for range checking, updated to Unicode version 4.0.1 (API docs also updated) * python/generator.py: minor change to fix a warning Wed Nov 5 23:46:36 CET 2003 Daniel Veillard * Makefile.am: apply fix from Karl Eichwalder for script path Wed Nov 5 10:49:20 CET 2003 Daniel Veillard * win32/configure.js: applied patch from Mark Vakoc to simplify his work from CVS checkouts. Tue Nov 4 21:16:47 MST 2003 John Fleck * doc/xmlreader.html: minor cleanups Tue Nov 4 15:52:28 PST 2003 William Brack * include/libxml/xmlversion.h.in: changed macro ATTRIBUTE_UNUSED for gcc so that, if undefined, it's defined as __attribute__((unused)) Tue Nov 4 15:28:07 PST 2003 William Brack * python/generator.py: small enhancement to assure ATTRIBUTE_UNUSED appears after the variable declaration. * valid.c: trivial change to eliminate a warning message Tue Nov 4 11:24:04 CET 2003 Daniel Veillard * configure.in NEWS doc/*: preparing release 2.6.2, updated and rebuilt the docs Tue Nov 4 09:38:46 CET 2003 Daniel Veillard * xmllint.c: change --html to make sure we use the HTML serialization rule by default when HTML parser is used, add --xmlout to allow to force the XML serializer on HTML. * HTMLtree.c: ugly tweak to fix the output on

element and solve #125093 * result/HTML/*: this changes the output of some tests Mon Nov 3 17:51:28 CET 2003 Daniel Veillard * xinclude.c: fixed bug #125812, about XPointer in XInclude failing but not returning an error. Mon Nov 3 17:18:22 CET 2003 Daniel Veillard * valid.c: fixed bug #125811 related to DTD post validation where the DTD doesn't pertain to a document. Mon Nov 3 15:25:58 CET 2003 Daniel Veillard * parser.c xmlIO.c include/libxml/parserInternals.h: implemented the XML_PARSE_NONET parser option. * xmllint.c: converted xmllint.c to use the option instead of relying on the global resolver variable. Mon Nov 3 13:26:32 CET 2003 Daniel Veillard * xinclude.c xmlreader.c include/libxml/xinclude.h: adding XInclude support to the reader interface. Lot of testing of the walker, various bug fixes. * xmllint.c: added --walker and made sure --xinclude --stream --debug works as expected * Makefile.am result/dtd11.rdr result/ent6.rdr test/dtd11 test/ent6 result/XInclude/*.rdr: added regression tests for the walker and XInclude xmlReader support, had to slightly change a couple of tests because the walker can't distinguish from Sat Nov 1 17:42:27 CET 2003 Daniel Veillard * tree.c nanohttp.c threads.c: second BeOS patch from Marcin 'Shard' Konicki Fri Oct 31 15:35:20 CET 2003 Daniel Veillard * parser.c: always generate line numbers Fri Oct 31 11:53:46 CET 2003 Daniel Veillard * parser.c: fixed another regression introduced in fixing #125823 Fri Oct 31 11:33:18 CET 2003 Daniel Veillard * python/libxml.c: previous fix for #124044 was broken, correct fix provided. * HTMLparser.c parser.c parserInternals.c xmlIO.c: fix xmlStopParser() and the error handlers to address #125877 Thu Oct 30 23:10:46 CET 2003 Daniel Veillard * parser.c: side effect of #123105 patch, namespace resolution would fail when defined in internal entities, fixes #125823 Thu Oct 30 14:10:42 CET 2003 Daniel Veillard * python/libxml.c: be more defensive in the xmlReader python bindings fixing bug #124044 Thu Oct 30 11:14:31 CET 2003 Daniel Veillard * valid.c: the a-posteriori DTD validation code was not validating the namespace declarations, this fixes #124110 Wed Oct 29 14:13:03 PDT 2003 William Brack * xmlIO.c: enhanced to bypass compression detection code when input file is stdin (bug 125801) Wed Oct 29 18:21:00 CET 2003 Daniel Veillard * xmlIO.c: fix needed when HTTP is not compiled in by Mark Vakoc Wed Oct 29 18:05:53 CET 2003 Daniel Veillard * xpath.c: more fixes about unregistering objects * include/libxml/relaxng.h: applied patch from Mark Vakoc missing _cplusplus processing clause Wed Oct 29 07:49:52 2003 Aleksey Sanin * include/libxml/parser.h parser.c: added xmlStrVPrintf function Wed Oct 29 14:37:40 CET 2003 Daniel Veillard * nanoftp.c nanohttp.c testThreads.c threads.c: applied patch from Marcin 'Shard' Konicki to provide BeOS thread support. Wed Oct 29 14:20:14 CET 2003 Daniel Veillard * xmlschemas.c include/libxml/xmlschemas.h: applied patch from Steve Ball to make a schema parser from a preparsed document. Wed Oct 29 13:52:25 CET 2003 Daniel Veillard * tree.c: applied a couple of patches from Mark Lilback about text nodes coalescing Wed Oct 29 12:16:52 CET 2003 Daniel Veillard * xpath.c: change suggested by Anthony Carrico when unregistering a namespace prefix to a context * hash.c: be more careful about calling callbacks with NULL payloads. Wed Oct 29 00:04:26 CET 2003 Daniel Veillard * configure.in NEWS doc/*: preparing release 2.6.1, updated and regenerated docs and APIs * parser.c: cleanup and last change to fix #123105 Tue Oct 28 23:02:29 CET 2003 Daniel Veillard * HTMLparser.c: Fix #124907 by simply backporting the same fix as for the XML parser * result/HTML/doc3.htm.err: change to ID detecting modified one test result. Tue Oct 28 22:28:50 CET 2003 Daniel Veillard * parser.c include/libxml/parser.h: included a new function to reuse a Push parser context, based on Graham Bennett original code * valid.c: in HTML, a name in an input is not an ID * TODO: bug list update Tue Oct 28 19:54:37 CET 2003 Daniel Veillard * xpath.c: applied patch from nico@xtradyne.com for #125030 Tue Oct 28 16:42:16 CET 2003 Daniel Veillard * Makefile.am: cleanup * error.c valid.c include/libxml/xmlerror.h: fixing bug #125653 sometimes the error handlers can get a parser context on DTD errors, and sometime they don't. So be very careful when trying to grab those informations. Tue Oct 28 15:26:18 CET 2003 Daniel Veillard * tree.c: applied patch from Kasimier BmA;~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'O|uchcik which fixes a problem in xmlSearchNs introduced in 2.6.0 Tue Oct 28 14:57:03 CET 2003 Daniel Veillard * parser.c: fixed #123263, the encoding is mandatory in a textdecl. Tue Oct 28 13:48:52 CET 2003 Daniel Veillard * tree.c: fix bug #125047 about serializing when finding a document fragment node. Mon Oct 27 11:11:29 EST 2003 Daniel Veillard * testSAX.c: fix bug #125592 need a NULL check * include/libxml/chvalid.h: rename a parameter Mon Oct 27 09:43:48 EST 2003 Daniel Veillard * parser.c: applied patch from #123105 about defaulted attributes from element coming from an entity Mon Oct 27 21:12:27 HKT 2003 William Brack * xmllint.c: fixed warning message from IRIX (bug 125182) * python/libxml.py: removed tabs, replaced with spaces (bug 125572) Mon Oct 27 06:17:30 EST 2003 Daniel Veillard * libxml.h parserInternals.c xmlIO.c: make sure we report errors if xmlNewInputFromFile() fails. * xmlreader.c: avoid using _private for the node or document elements. Sat Oct 25 17:33:59 CEST 2003 Igor Zlatkovic * win32/configure.js: added declaration for verMicroSuffix Fri Oct 24 23:08:17 CEST 2003 Daniel Veillard * libxml.m4: applied patch from Patrick Welche provided in bug #125432 , future proofing the .m4 file. * parser.c: resetting the context should also reset the error * TODO: problem of conformance w.r.t. E20 was raised in the XML Core telconf and libxml2 isn't conformant there. Wed Oct 22 14:33:05 CEST 2003 Daniel Veillard * xmlwriter.c: applied patch from Alfred Mickautsch fixing #125180 Wed Oct 22 10:50:31 CEST 2003 Daniel Veillard * chvalid.c genChRanges.py: Stephane Bidoul pointed out another small glitch missing a const Wed Oct 22 10:43:21 CEST 2003 Daniel Veillard * chvalid.c genChRanges.py: Stephane Bidoul pointed out that it doesn't define IN_LIBXML Tue Oct 21 21:14:55 CEST 2003 Daniel Veillard * win32/Makefile.mingw: typo pointed out by Stephane Bidoul Tue Oct 21 11:26:36 CEST 2003 Daniel Veillard * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc win32/configure.js: set of Win32 patches for 2.6.0 by Joachim Bauch Tue Oct 21 02:07:22 CEST 2003 Daniel Veillard * tree.c: last minute patch from Eric Zurcher making it into 2.6.0 Tue Oct 21 02:03:03 CEST 2003 Daniel Veillard * configure.in NEWS doc/libxml2.xsa: preparing libxml2-2.6.0 * doc/*: updated and regenerated the docs and API Tue Oct 21 01:01:55 CEST 2003 Daniel Veillard * SAX2.c error.c tree.c: moved the line number to their proper field in elements now. Tue Oct 21 00:28:20 CEST 2003 Daniel Veillard * configure.in xmlwriter.c Makefile.am include/libxml/xmlwriter.h include/libxml/Makefile.am include/libxml/xmlversion.h.in: added the xmlWriter module contributed by Alfred Mickautsch * include/libxml/tree.h: added room for line and extra information * xmlreader.c python/tests/reader6.py: bugfixing some problem some of them introduced in September * win32/libxml2.def.src doc/libxml2-api.xml: regenerated the API Mon Oct 20 19:02:53 CEST 2003 Daniel Veillard * Makefile.am configure.in xmldwalk.c xmlreader.c include/libxml/Makefile.am include/libxml/xmldwalk.h include/libxml/xmlversion.h.in: removing xmldwalk module since it got merged with the xmlreader. * parser.c: cleanup * win32/libxml2.def.src python/libxml2class.txt doc/libxml2-api.xml: rebuilt the API * python/tests/Makefile.am python/tests/reader7.py python/tests/walker.py: adding regression testing for the new xmlreader APIs, new APIs for reader creation, including makeing reader "walker" operating on preparsed document trees. Sun Oct 20 22:37:03 HKT 2003 William Brack * entities.c, valid.c: fixed problem reported on the mailing list by Melvyn Sopacua - wrong argument order on functions called through xmlHashScan. Sun Oct 19 23:57:45 CEST 2003 Daniel Veillard * valid.c xmlIO.c: fixes for compiling using --with-minimum Sun Oct 19 23:46:04 CEST 2003 Daniel Veillard * tree.c: cleanup xmlNodeGetContent() reusing xmlNodeBufGetContent(), tested it through the xslt regression suite. Sun Oct 19 22:42:16 CEST 2003 Daniel Veillard * tree.c include/libxml/tree.h: adding xmlNodeBufGetContent() allowing to grab the content without forcing allocations. * python/libxml2class.txt doc/libxml2-api.xml: rebuilt the API * xpath.c xmldwalk.c: removed a couple of comment errors. Sun Oct 19 16:39:36 CEST 2003 Daniel Veillard * parser.c: applied patch from Chris Anderson to change back memcmp with CMPx() Sun Oct 19 16:24:19 CEST 2003 Daniel Veillard * HTMLparser.c: fixed to not send NULL to %s printing * python/tests/error.py result/HTML/doc3.htm.err result/HTML/test3.html.err result/HTML/wired.html.err result/valid/t8.xml.err result/valid/t8a.xml.err: cleaning up some of the regression tests error Sun Oct 19 15:31:43 CEST 2003 Daniel Veillard * include/libxml/nanohttp.h include/libxml/parserInternals.h include/libxml/xmlIO.h nanohttp.c parserInternals.c xmlIO.c: Fixed the HTTP<->parser interraction, which should fix 2 long standing bugs #104790 and #124054 , this also fix the fact that HTTP error code (> 400) should not generate data, we usually don't want to parse the HTML error information instead of the resource looked at. Sun Oct 19 19:20:48 HKT 2003 William Brack * doc/Makefile.am: enhanced the installation of tutorial files to avoid installing CVS subdirectories (bug 122943) Sun Oct 19 17:33:27 HKT 2003 William Brack * xmlIO.c: fixed segfault when input file not present * tree.c: changed output formatting of XML_CDATA_SECTION (bug 120917) Sun Oct 19 00:15:38 HKT 2003 William Brack * include/libxml/parserInternals.h HTMLparser.c HTMLtree.c SAX2.c catalog.c debugXML.c entities.c parser.c relaxng.c testSAX.c tree.c valid.c xmlschemas.c xmlschemastypes.c xpath.c: Changed all (?) occurences where validation macros (IS_xxx) had single-byte arguments to use IS_xxx_CH instead (e.g. IS_BLANK changed to IS_BLANK_CH). This gets rid of many warning messages on certain platforms, and also high- lights places in the library which may need to be enhanced for proper UTF8 handling. Sat Oct 18 20:34:18 HKT 2003 William Brack * genChRanges.py, chvalid.c, include/libxml/chvalid.h, doc/apibuild.py: enhanced to include enough comments to make the api doc generation happy. Sat Oct 18 07:28:25 EDT 2003 Daniel Veillard * nanohttp.c xmlIO.c include/libxml/nanohttp.h: starting work to fix the HTTP/XML parser integration. Sat Oct 18 11:04:32 CEST 2003 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h: added new APIs for creating reader from sources or reusing a reader with a new source, like the xmlReadxx and xmlCtxtReadxxx * win32/libxml2.def.src doc/libxml2-api.xml doc/apibuild.py doc/Makefile.am: regenerated the APIs * doc/xml.html: applied a patch from Stefan Kost for namesapce docs Sat Oct 18 12:46:02 HKT 2003 William Brack * genChRanges.py, chvalid.c, include/libxml/chvalid.h, include/libxml/parserInternals.h: enhanced macros to avoid breaking ABI from previous versions. * catalog.c, parser.c, tree.c: modified to use IS_* macros defined in parserInternals.h. Makes maintenance much easier. * testHTML.c, testSAX.c, python/libxml.c: minor fixes to avoid compilation warnings * configuration.in: fixed pushHTML test error; enhanced for better devel (me) testing Fri Oct 17 14:38:54 CEST 2003 Daniel Veillard * legacy.c: remove the warning for startDocument(), as it is used by glade (or glade-python) * parser.c relaxng.c xmlschemastypes.c: fixed an assorted set of invalid accesses found by running some Python based regression tests under valgrind. There is still a few leaks reported by the relaxng regressions which need some attention. * doc/Makefile.am: fixed a make install problem c.f. #124539 * include/libxml/parserInternals.h: addition of xmlParserMaxDepth patch from crutcher Wed Oct 15 12:47:33 CEST 2003 Daniel Veillard * parser.c: Marc Liyanage pointed out that xmlCleanupParser() was missing xmlCleanupInputCallbacks and xmlCleanupOutputCallbacks calls. Wed Oct 15 10:16:47 CEST 2003 Daniel Veillard * vms/build_libxml.com trionan.c: VMS patch from Craig A. Berry Mon Oct 13 21:46:25 CEST 2003 Daniel Veillard * Makefile.am: small fix from Bjorn Reese Mon Oct 13 15:59:25 CEST 2003 Daniel Veillard * valid.c: fix a call missing arguments Sun Oct 12 18:42:18 HKT 2003 William Brack * genChRanges.py, chvalid.c, include/libxml/chvalid.h: fixed a bug in the range search; enhanced range generation (inline code if a small number of intervals); enhanced the readability of the output files. Sun Oct 12 00:52:14 CEST 2003 Daniel Veillard * chvalid.def chvalid.c include/libxml/chvalid.h: rebuilt chvalid.def from scratch based on XML 2nd edition REC and regenerated the code. Sat Oct 11 22:54:13 CEST 2003 Daniel Veillard * check-xml-test-suite.py: removed some annoying warnings * chvalid.def chvalid.c include/libxml/chvalid.h: fixed a bug in the PubidChars definition, regenerated, there is still a bug left somewhere * genChRanges.py: save the header directly in include/libxml/ * configure.in: I generated a 2.6.0beta6 earlier today Sat Oct 11 23:32:47 HKT 2003 William Brack * fixed small error on previous commit (chvalid.h in base dir instead of include directory) Sat Oct 11 23:11:22 HKT 2003 William Brack * genChRange.py, chvalid.def, chvalid.c, include/libxml/chvalid.h: new files for a different method for doing range validation of character data. * Makefile.am, parserInternals.c, include/libxml/Makefile.am, include/libxml/parserInternals.h: modified for new range method. * catalog.c: small enhance for warning message (using one of the new range routines) Sat Oct 11 13:24:57 CEST 2003 Daniel Veillard * valid.c include/libxml/valid.h: adding an serror field to the validation context breaks the ABI for the xmlParserCtxt structure since it's embedded by content and not by reference Sat Oct 11 12:46:49 CEST 2003 Daniel Veillard * configure.in: patch from Mike Hommey * threads.c: applied Windows patch from Jesse Pelton and Stephane Bidoul * parser.c: fix the potentially nasty access to ctxt->serror without checking first that the SAX block is version 2 Fri Oct 10 21:34:01 CEST 2003 Daniel Veillard * SAX2.c: fixed a nasty bug with interning some text strings * configure.in: prepare for beta5 of 2.6.0 * libxml.h nanoftp.c nanohttp.c xmlIO.c include/libxml/xmlerror.h: better error handling for I/O and converted FTP and HTTP * parser.c: fixed another bug Fri Oct 10 16:45:20 CEST 2003 Daniel Veillard * SAX2.c: fixed uninitialized new field. * result/VC/OneID2 result/relaxng/*.err: fixed a typo updating all messages Fri Oct 10 16:19:17 CEST 2003 Daniel Veillard * include/libxml/tree.h: make room in Doc, Element, Attributes for PSVI type informations. Fri Oct 10 16:08:02 CEST 2003 Daniel Veillard * HTMLparser.c c14n.c catalog.c error.c globals.c parser.c parserInternals.c relaxng.c valid.c xinclude.c xmlIO.c xmlregexp.c xmlschemas.c xpath.c xpointer.c include/libxml/globals.h include/libxml/parser.h include/libxml/valid.h include/libxml/xmlerror.h: Setting up the framework for structured error reporting, touches a lot of modules, but little code now the error handling trail has been cleaned up. Fri Oct 10 14:29:42 CEST 2003 Daniel Veillard * c14n.c include/libxml/xmlerror.h: converted the C14N module too Fri Oct 10 13:40:51 CEST 2003 Daniel Veillard * xpath.c: cleanup * xpointer.c include/libxml/xmlerror.h: migrated XPointer module to the new error mechanism Fri Oct 10 12:49:53 CEST 2003 Daniel Veillard * error.c xmlschemas.c: a bit of cleanup * result/schemas/*.err: updated with the new result strings Fri Oct 10 03:58:39 PDT 2003 William Brack * xpath.c: fixed bug 124061 Fri Oct 10 02:47:22 CEST 2003 Daniel Veillard * Makefile.am: cleanup * encoding.c: fix a funny typo * error.c xmlschemas.c xmlschemastypes.c include/libxml/xmlerror.h: converted the Schemas code to the new error handling. PITA, still need to check output from regression tests. Thu Oct 9 15:13:53 CEST 2003 Daniel Veillard * HTMLtree.c include/libxml/xmlerror.h: converted too * tree.c: small cleanup Thu Oct 9 13:44:57 CEST 2003 Daniel Veillard * xinclude.c: comment fix * catalog.c include/libxml/xmlerror.h: migrating the catalog code to the new infrastructure Thu Oct 9 00:36:03 CEST 2003 Daniel Veillard * xmlIO.c: final error handling cleanup * xinclude.c error.c: converted XInclude to the new error handling * include/libxml/xmlerror.h: added XInclude errors Wed Oct 8 23:31:23 CEST 2003 Daniel Veillard * parser.c: bug in compression saving was crashing galeon reported by teuf Wed Oct 8 21:18:12 CEST 2003 Daniel Veillard * error.c tree.c xmlIO.c xmllint.c: more cleanup through the I/O error path Wed Oct 8 20:57:27 CEST 2003 Daniel Veillard * xmlIO.c: better handling of error cases Wed Oct 8 13:51:14 CEST 2003 Daniel Veillard * xmlIO.c xmllint.c include/libxml/xmlerror.h: first pass at cleaning up error handling in the I/O module. Wed Oct 8 10:52:05 CEST 2003 Daniel Veillard * xmlregexp.c include/libxml/xmlerror.h: error handling cleanup of the Regexp module. Wed Oct 8 01:09:05 CEST 2003 Daniel Veillard * tree.c: converting the tree module too * error.c include/libxml/xmlerror.h: created a simpler internal error reporting function. Tue Oct 7 23:19:39 CEST 2003 Daniel Veillard * error.c include/libxml/xmlerror.h include/libxml/xpath.h include/libxml/xpathInternals.h xpath.c: cleaning up XPath error reporting that time. * threads.c: applied the two patches for TLS threads on Windows from Jesse Pelton * parser.c: tiny safety patch for xmlStrPrintf() make sure the return is always zero terminated. Should also help detecting passing wrong buffer size easilly. * result/VC/* result/valid/rss.xml.err result/valid/xlink.xml.err: updated the results to follow the errors string generated by last commit. Tue Oct 7 14:16:45 CEST 2003 Daniel Veillard * relaxng.c include/libxml/xmlerror.h: last cleanup of error handling in the Relax-NG module. Tue Oct 7 13:30:39 CEST 2003 Daniel Veillard * error.c relaxng.c include/libxml/xmlerror.h: switched Relax-NG module to teh new error reporting. Better default report, adds the element associated if found, context and node are included in the xmlError * python/tests/reader2.py: the error messages changed. * result/relaxng/*: error message changed too. Mon Oct 6 10:46:35 CEST 2003 Daniel Veillard * win32/Makefile.bcb win32/Makefile.mingw win32/Makefile.msvc win32/configure.js: applied patch from Stphane Bidoul to fix the compilation of 2.6.0 code on Win32 Mon Oct 6 10:16:30 CEST 2003 Daniel Veillard * check-xml-test-suite.py: fixing the script * parser.c: replace sequences of RAW && NXT(.) == '.' with memcmp calls, seems to not break conformance, slightly inflate the size of the gcc generated code though. Sun Oct 5 23:30:48 CEST 2003 Daniel Veillard * parserInternals.c parser.c valid.c include/libxml/parserInternals.h: more cleanup of error handling in parserInternals, sharing the routine for memory errors. Sun Oct 5 15:49:14 CEST 2003 Daniel Veillard * HTMLparser.c Makefile.am legacy.c parser.c parserInternals.c include/libxml/xmlerror.h: more code cleanup, especially around error messages, the HTML parser has now been upgraded to the new handling. * result/HTML/*: a few changes in the resulting error messages Sat Oct 4 23:06:41 CEST 2003 Daniel Veillard * parser.c include/libxml/xmlerror.h: more error/warning handling cleanups, the XML parser module should be okay now. Sat Oct 4 01:58:27 CEST 2003 Daniel Veillard * Makefile.am configure.in xmldwalk.c include/libxml/Makefile.am include/libxml/xmldwalk.h include/libxml/xmlversion.h.in: integrated the xmlDocWalker API given by Alfred Mickautsch, and providing an xmlReader like API but working on a xmlDocPtr. Sat Oct 4 00:18:29 CEST 2003 Daniel Veillard * Makefile.am: more cleanup in make tests * error.c valid.c parser.c include/libxml/xmlerror.h: more work in the transition to the new error reporting strategy. * python/tests/reader2.py result/VC/* result/valid/*: few changes in the strings generated by the validation output Fri Oct 3 00:19:02 CEST 2003 Daniel Veillard * Makefile.am: changed 'make tests' to use a concise output, scrolling to see where thing broke wasn't pleasant * configure.in: some beta4 preparation, but not ready yet * error.c globals.c include/libxml/globals.h include/libxml/xmlerror.h: new error handling code, last error informations are stored in the parsing context or a global variable, new APIs to handle the xmlErrorPtr type. * parser.c parserInternals.c valid.c : started migrating to the new error handling code, it's a royal pain. * include/libxml/parser.h include/libxml/parserInternals.h: moved the definition of xmlNewParserCtxt() * parser.c: small potential buffer access problem in push code provided by Justin Fletcher * result/*.sax result/VC/PENesting* result/namespaces/* result/valid/*.err: some error messages were sligthly changed. Thu Oct 2 13:01:13 2003 Aleksey Sanin * include/libxml/parser.h parser.c: introduced xmlStrPrintf function (wrapper around snprintf) Wed Oct 1 21:12:06 CEST 2003 Daniel Veillard * entities.c: Fix error on output of high codepoint charref like 􏿿 , reported by Eric Hanchrow Wed Oct 1 14:20:10 CEST 2003 Daniel Veillard * DOCBparser.c include/libxml/DOCBparser.h: let's see how much of a pain murrayc is really gonna be. Wed Oct 1 11:03:40 CEST 2003 Daniel Veillard * xmlreader.c: Applied fix for bug #123481 reported by Peter Derr Tue Sep 30 15:34:31 CEST 2003 Daniel Veillard * entities.c legacy.c parser.c: made the predefined entities static predefined structures to avoid the work, memory and hazards associated to initialization/cleanup. Tue Sep 30 14:30:47 CEST 2003 Daniel Veillard * HTMLparser.c Makefile.am configure.in legacy.c parser.c parserInternals.c testHTML.c xmllint.c include/libxml/HTMLparser.h include/libxml/parser.h include/libxml/parserInternals.h include/libxml/xmlversion.h.in: added a new configure option --with-push, some cleanups, chased code size anomalies. Now a library configured --with-minimum is around 150KB, sounds good enough. Tue Sep 30 12:31:00 AEST 2003 Malcolm Tredinnick * libxml-2.0-uninstalled.pc.in: New file for building against uninstalled libxml2 builds. * configure.in, Makefile.am: Support the *-uninstalled.pc file. * .cvsignore: Ignore the new generated *.pc file. Tue Sep 30 02:38:16 CEST 2003 Daniel Veillard * Makefile.am SAX.c SAX2.c configure.in globals.c parser.c parserInternals.c testReader.c testSAX.c xmlIO.c xmllint.c xmlreader.c example/gjobread.c include/libxml/xmlversion.h.in: added 2 new configure option: --with-reader --with-sax1 to allow removing the reader or non-xmlReadxxx() interfaces. Mon Sep 29 19:58:26 CEST 2003 Daniel Veillard * configure.in entities.c tree.c valid.c xmllint.c include/libxml/tree.h include/libxml/xmlversion.h.in: Adding a configure option to remove tree manipulation code which is not strictly needed by the parser. Mon Sep 29 15:23:41 CEST 2003 Daniel Veillard * nanoftp.c nanohttp.c: last finishing touch to the BeOS patch from Marcin 'Shard' Konicki Mon Sep 29 15:15:08 CEST 2003 Daniel Veillard * HTMLtree.c SAX2.c c14n.c catalog.c configure.in debugXML.c encoding.c entities.c nanoftp.c nanohttp.c parser.c relaxng.c testAutomata.c testC14N.c testHTML.c testRegexp.c testRelax.c testSchemas.c testXPath.c threads.c tree.c valid.c xmlIO.c xmlcatalog.c xmllint.c xmlmemory.c xmlreader.c xmlschemas.c example/gjobread.c include/libxml/HTMLtree.h include/libxml/c14n.h include/libxml/catalog.h include/libxml/debugXML.h include/libxml/entities.h include/libxml/nanohttp.h include/libxml/relaxng.h include/libxml/tree.h include/libxml/valid.h include/libxml/xmlIO.h include/libxml/xmlschemas.h include/libxml/xmlversion.h.in include/libxml/xpathInternals.h python/libxml.c: Okay this is scary but it is just adding a configure option to disable output, this touches most of the files. Mon Sep 29 12:53:56 CEST 2003 Daniel Veillard * xmlmemory.c: better fix, avoids breaking the python bindings Mon Sep 29 11:21:33 CEST 2003 Daniel Veillard * xmlmemory.c: fix a compilation problem when configuring with debug but without mem-debug Sun Sep 28 20:53:17 CEST 2003 Daniel Veillard * Makefile.am: cleanup, creating a new legacy.c module, made sure make tests ran in reduced conditions * SAX.c SAX2.c configure.in entities.c globals.c parser.c parserInternals.c tree.c valid.c xlink.c xmlIO.c xmlcatalog.c xmlmemory.c xpath.c xmlmemory.c include/libxml/xmlversion.h.in: increased the modularization, allow to configure out validation code and legacy code, added a configuration option --with-minimum compiling only the mandatory code which then shrink to 200KB. Sun Sep 28 02:15:07 CEST 2003 Daniel Veillard * parser.c: fix a bug raised by the Mips compiler. * include/libxml/SAX.h include/libxml/parser.h: move the SAXv1 block definitions to parser.h fixes bug #123380 * xmlreader.c include/libxml/xmlreader.h: reinstanciate the attribute and element pool borken 2 commits ago. Start playing with an entry point to preserve a subtree. * entities.c: remove a warning. Sat Sep 27 12:19:38 PDT 2003 William Brack * encoding.c, parser.c, relaxng.c: further (final?) minor changes for compilation warnings. No change to logic. Fri Sep 26 18:03:42 PDT 2003 William Brack * parser.c: fixed small problem with missing entities (test/ent2) Sat Sep 27 01:25:39 CEST 2003 Daniel Veillard * parser.c: William's change allowed to spot a nasty bug in xmlDoRead if the result is not well formed that ctxt->myDoc is not NULL and uses the context dictionnary. Fri Sep 26 21:09:34 CEST 2003 Daniel Veillard * parser.c: other patches from William Brack to avoid compilation warnings on AIX. Fri Sep 26 11:03:08 PDT 2003 William Brack * HTMLparser.c, entities.c, xmlreader.c: minor change to avoid compilation warnings on some (e.g. AIX) systems Fri Sep 26 16:49:25 CEST 2003 Daniel Veillard * parserInternals.c: fixed a backward compatibility problem when formatting "deprecated SAXv1 function ignorableWhitespace" could be reproduced by xmllint --format Fri Sep 26 15:50:44 CEST 2003 Daniel Veillard * doc/libxml2-api.xml: rebuilt the API * xmllint.c doc/xmllint.1 doc/xmllint.xml: added the new options --nocdata and --nsclean to remove CDATA section and surperfluous namespace declarations * parser.c SAX2.c: implementation of the 2 new options Fri Sep 26 14:41:53 CEST 2003 Daniel Veillard * HTMLparser.c testHTML.c xmllint.c include/libxml/HTMLparser.h: added the same htmlRead APIs than their XML counterparts * include/libxml/parser.h: new parser options, not yet implemented, added an options field to the context. * tree.c: patch from Shaun McCance to fix bug #123238 when ]]> is found within a cdata section. * result/noent/cdata2 result/cdata2 result/cdata2.rdr result/cdata2.sax test/cdata2: add one more cdata test Thu Sep 25 23:03:23 CEST 2003 Daniel Veillard * parser.c xmllint.c doc/libxml2-api.xml include/libxml/parser.h: Changed the new xmlRead/xmlCtxtRead APIs to have an extra base URL parameter when not loading from a file or URL. Thu Sep 25 16:23:58 CEST 2003 Daniel Veillard * configure.in: preparing a beta3 solving the ABI problems * globals.c parser.c parserInternals.c testHTML.c HTMLparser.c SAX.c include/libxml/globals.h include/libxml/SAX.h: make sure the global variables for the default SAX handler are V1 ones to avoid ABI compat problems. * xmlreader.c: cleanup of uneeded code * hash.c: fix a comment Thu Sep 25 14:16:51 CEST 2003 Daniel Veillard * SAX2.c hash.c parser.c include/libxml/xmlexports.h include/libxml/xmlmemory.h include/libxml/xmlversion.h.in: fixing some comments to avoid warnings from apibuild.py Wed Sep 24 23:42:08 CEST 2003 Daniel Veillard * win32/configure.js: patch from Stephane Bidoul for configuring the beta2 version #123104 Wed Sep 24 23:17:59 CEST 2003 Daniel Veillard * Makefile.am: adding repeated parsing and validating tests * SAX2.c parser.c tree.c include/libxml/parser.h: make the new DOM tree building interfaces use the dictionary from the parsing context to build the element and attributes names as well as formatting spaces and short text nodes * include/libxml/dict.h dict.c: added some reference counting for xmlDictPtr because they can be shared by documents and a parser context. * xmlreader.c: a bit of cleanup, remove the specific tree freeing functions and use the standard ones now. * xmllint.c: add --nodict * python/libxml.c: fix a stupid bug so that ns() works on attribute nodes. Tue Sep 23 23:07:45 CEST 2003 Daniel Veillard * parser.c include/libxml/parser.h: adding a new set of API for parsing xmlReadDoc() xmlReadFile() ... xmlReadIO() and xmlCtxtReadDoc() ... xmlCtxtReadIO(). That with a clear define of xmlParserOption, xmlCtxtUseOptions() should simplify custom parsing without being tempted to use global variables, and xmlCtxtReset() should allow reuse of a context for multiple parsing. * xmllint.c: switched to use xmlReadXXX, allow options to be used simultaneously with less troubles. * tree.c: simple warning removal * doc/apibuild.py: small fix * doc/libxml2-api.xml win32/libxml2.def.src: updated Tue Sep 23 11:15:23 CEST 2003 Daniel Veillard * parser.c: revert xmlCreateDocParserCtxt() since this break the parseDoc() python bindings Tue Sep 23 11:00:18 CEST 2003 Daniel Veillard * parser.c: make sure xmlDetectSAX2() is called only at parsing time to avoid breaking apps changing the SAX callbacks after context allocation, change xmlCreateDocParserCtxt() to use an immutable buffer instead of a copy Tue Sep 23 09:40:33 CEST 2003 Daniel Veillard * xmlIO.c: applied patch from Markus Keim fixing a problem with I/O callback registration. * include/libxml/xmlerror.h: fixed #122994 comment numbering for xmlParserErrors Mon Sep 22 12:21:11 CEST 2003 Daniel Veillard * tree.c include/libxml/tree.h: the uri arg to xmlNodeSetBase is really a const xmlChar* * xmlreader.c include/libxml/xmlreader.h: addin the xmlTextReaderConstString() to get an interned string from the reader Sun Sep 20 17:22:20 PDT 2003 William Brack * error.c: fixed a warning message (trivial) * doc/search.php: removed incorrect warning message when word search not found in last of multiple tables (bug 119535) Fri Sep 19 14:26:28 CEST 2003 Daniel Veillard * configure.in: preparing a 2.6.0-beta2 release * xmlIO.c: avoid a warning * tree.c: avoid duplicate code in xmlReplaceNode as pointed out by Chris Ryland * include/libxml/dict.h: add a QName access lookup to the dictionary. * xmlreader.c include/libxml/xmlreader.h: adding const access based on the dictionary interface for string read from the reader, the node content access is still TODO, it's too different Fri Sep 19 00:01:08 CEST 2003 Daniel Veillard * SAX2.c: fixing namespace DTD validations * result/valid/ns2.xml result/valid/ns.xml: the output of defaulted namespaces is slightly different now. * Makefile.am: report the memory used in Timingtests (as well as time) Thu Sep 18 15:29:46 CEST 2003 Daniel Veillard * Makefile.am: add streaming on memory regression tests, found bad bugs in the reader interface * xmlreader.c: fixing bugs w.r.t. very large names, and special condition in end of file. * xmlIO.c tree.c include/libxml/tree.h include/libxml/xmlIO.h: adding immutable buffers, and parser input based on those, but this should not be used (yet) for general parsing * parser.c: added a comment about using immutable buffers for general parsing. * result/bigname.xml.rdr result/bigname2.xml.rdr: fixing the output of the regression tests * xmllint.c: using the immutable buffers when streaming on mmaped file (--stream --memory) Thu Sep 18 12:04:50 CEST 2003 Daniel Veillard * dict.c: the last patch broke unicity of returned strings, removed Thu Sep 18 00:31:02 CEST 2003 Daniel Veillard * Makefile.am: add a Timingtests target to check bad behaviour from the streaming engine * dbgen.pl dbgenattr.pl: perl script to generate big instances * xmlreader.c: fix a bad behaviour on large buffer inputs Wed Sep 17 23:25:47 CEST 2003 Daniel Veillard * dict.c xmlreader.c: two small improvements Wed Sep 17 22:53:32 CEST 2003 Daniel Veillard * parserInternals.c: avoid a leak with previous patch Wed Sep 17 22:06:11 CEST 2003 Daniel Veillard D~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'l| * python/libxml.c: use stderr and not stdout for default errors in python environment bug #122552 Wed Sep 17 21:33:57 CEST 2003 Daniel Veillard * parserInternals.c: small fix from Rob Richards for input filename * xmllint.c: fixes for --repeat and --memory/--stream for speed tests * xmlIO: adding a guard in one function Wed Sep 17 15:57:44 CEST 2003 Daniel Veillard * SAX2.c xmlreader.c include/libxml/parser.h: more performance hunting reducing memory allocation and free and avoiding expensive routines Wed Sep 17 12:23:41 CEST 2003 Daniel Veillard * SAX2.c parser.c parserInternals.c xmlreader.c: started messing seriously with per-document dict and element and attribute nodes reuse in the xmlReader. This seems to lead to an interesting speedup of the xmlReader already. Wed Sep 17 01:07:56 CEST 2003 Daniel Veillard * dict.c include/libxml/dict.h: do string allocations in large pools, allowing to find if a string pertain to a dict quickly * xmllint.c: fix --stream --repeat --timing * Makefile.am: the testThreads run output should be seen. Mon Sep 15 16:46:28 CEST 2003 Daniel Veillard * SAX2.c include/libxml/parser.h: starting work on reusing the parser dictionary for the element and attribute tag names. Add pools for Element and Attributes in the parser context, which should help speeding up the reader. * Makefile.am result/*.rdr : adding non-python reader regression tests. Mon Sep 15 14:54:42 CEST 2003 Daniel Veillard * SAX2.c parser.c valid.c: starting to cleanup some of the problems exposed by the W3C/NIST regression suite. * result/ent7.sax result/xml2.sax: small fixes. Mon Sep 15 11:46:47 CEST 2003 Daniel Veillard * parser.c: more parser error factoring Sun Sep 14 21:53:39 PDT 2003 William Brack * HTMLtree.c: Fixed bug 121394 - missing ns on attributes Sun Sep 14 21:43:32 CEST 2003 Daniel Veillard * parser.c include/libxml/xmlerror.h: factoring of more error handling code, serious size reduction and more lisibility of the resulting code. * parserInternals.c parser.c include/libxml/parserInternals.h include/libxml/parser.h: changing the way VC:Proper Group/PE Nesting checks are done, use a counter for entities. Entities where freed and reallocated at the same address failing the check. * tree.c: avoid a warning * result/valid/* result/VC/*: this slightly changes some validation error messages. Sun Sep 14 11:03:27 PDT 2003 William Brack * valid.c: fixed bug 121759 - early declaration of attribute-list in external DTD Sat Sep 13 14:42:11 CEST 2003 Daniel Veillard * parser.c include/libxml/xmlerror.h: starting cleaning up error handling, factorize error processing * doc/xmllint.html: update of the page, remove --sgml Sat Sep 13 02:13:50 CEST 2003 Daniel Veillard * Makefile.am DOCBparser.c parserInternals.c testDocbook.c xmllint.c doc/xmllint.xml doc/xmllint.1: removing the broken pseudo SGML DocBook parser code. Fri Sep 12 17:24:11 CEST 2003 Daniel Veillard * xpath.c: fix a problem with strcpy() in xmlXPathFormatNumber() valgrind pointed out the strings overlapped. cleanup . Fri Sep 12 11:43:12 CEST 2003 Daniel Veillard * tree.c: applied speedup to xmlSearchNs() as suggested by Luca Padovani. Cleaned up xmlSearchNsByHref() in the process applying the same trick. Fri Sep 12 01:36:20 CEST 2003 Daniel Veillard * parser.c parserInternals.c tree.c include/libxml/parser.h include/libxml/xmlerror.h: adding namespace checkings while making sure they still parse as wellformed documents. Add an nsWellFormed status report to the context, and provide new appropriate error codes. * Makefile.am result/namespaces/* test/namespaces/*: add specific regression testing for the new namespace support * test/att5 result/noent/att5 result/att5 result/att5.sax: add more coverage for the attribute parsing and normalization code. Fri Sep 12 01:34:19 CEST 2003 Daniel Veillard * threads.c: backport of a thread bugfix from 2_5_X branch Thu Sep 11 18:29:18 CEST 2003 Daniel Veillard * parser.c: fixed a bug in one corner case of attribute parsing. Thu Sep 11 16:21:53 CEST 2003 Daniel Veillard * configure.in doc/* : 2.6.0beta1 changes * SAX2.c hash.c parser.c parserInternals.c: Fixing attribute normalization, might not be totally fixed but this should make sure SAX event provide the right strings for attributes except entities for which libxml2 is different by default This should fix #109564 * result/attrib.xml.sax result/ent3.sax result/p3p.sax: minor changes in attribute callback values * result/c14n/with-comments/example-4 result/c14n/without-comments/example-4: this also fixes a subtle bug in the canonicalization tests. Wed Sep 10 12:38:44 CEST 2003 Daniel Veillard Time to commit 3 days of work rewriting the parser internal, fixing bugs and migrating to SAX2 interface by default. There is some work letf TODO, like namespace validation and attributes normalization (this break C14N right now) * Makefile.am: fixed the test rules * include/libxml/SAX2.h include/libxml/parser.h include/libxml/parserInternals.h SAX2.c parser.c parserInternals.c: changing the parser, migrating to SAX2, adding new interface to switch back to SAX1 or initialize a SAX block for v1 or v2. Most of the namespace work is done below SAX, as well as attribute defaulting * globals.c: changed initialization of the default SAX handlers * hash.c tree.c include/libxml/hash.h: added QName specific handling * xmlIO.c: small fix * xmllint.c testSAX.c: provide a --sax1 switch to test the old version code path * result/p3p result/p3p.sax result/noent/p3p test/p3p: the new code pointed out a typo in a very old test namespace Sun Sep 7 19:58:33 PTD 2003 William Brack * xmlIO.c include/libxml/xmlIO.h parser.c: Implemented detection of compressed files, setting doc->compressed appropriately (bug #120503). Sun Sep 7 22:53:06 CEST 2003 Daniel Veillard * parser.c: try to cope with the fact that apps may still have allocated smaller SAX callbak block Sun Sep 7 11:11:45 CEST 2003 Daniel Veillard * dict.c: allow to give -1 for undefined length in lookups * include/libxml/parser.h parser.c parserInternals.c testSAX.c: first round of work on the new SAX2 interfaces, the API will change but commiting before changing for historical reference. Sat Sep 6 10:55:01 PTD 2003 William Brack * SAX2.c, xmlIO.c: fixed bug #121210 (callback to sax->error, sax->warning with wrong params). Fri Sep 5 10:33:42 CEST 2003 Daniel Veillard * include/libxml/globals.h: patch from Stphane Bidoul to export globals entry points to the python bindings Wed Sep 3 15:24:41 CEST 2003 Daniel Veillard * HTMLparser.c: when creating a DOCTYPE use "html" lowercase by default instead of "HTML" * parser.c xmlreader.c: optimization, gain a few % parsing speed by avoiding calls to "areBlanks" when not needed. * include/libxml/parser.h include/libxml/tree.h: some structure extensions for future work on using per-document dictionaries. Wed Sep 3 15:08:06 CEST 2003 Daniel Veillard * Makefile.am results/*.sax SAXResult/*: removing the SAXresults tree, keeping result in the same tree, added SAXtests to the default "make tests" Tue Sep 2 15:59:04 CEST 2003 Igor Zlatkovic * include/libxml/xmlexports.h: defined additional macros which affect exports and added mingw section Mon Sep 1 15:15:18 PDT 2003 William Brack * doc/index.py: fixed problem parsing xhtml docs * doc/xmlreader.html,doc/guidelines.html: small modification to avoid problem in python parsing. * doc/search.php: fixed upper case filename problem for XSLT docs Mon Sep 1 22:55:09 CEST 2003 Daniel Veillard * xinclude.c: patch from Mark Vakoc that allows compiling with XInclude but without XPointer support. Mon Sep 1 22:31:38 CEST 2003 Daniel Veillard * configure.in xml2-config.in: Applied a patch from Kevin P. Fleming to add --libtool-libs option to xml2-config script. Sun Aug 31 21:52:12 PDT 2003 William Brack * doc/README.docs, doc/Makefile.am: new file added, giving some description of the documentation generation process * doc/search.php: fixed problem with upper case on filenames Fri Aug 29 12:25:01 CEST 2003 Igor Zlatkovic * win32/Makefile.bcb: updates by Eric Zurcher Thu Aug 28 22:58:38 PDT 2003 William Brack * doc/apibuild.py, doc/libxml2-api.xml: enhanced code to compensate for pollution from Igor's header taint (quick before Daniel notices) Thu Aug 28 23:01:36 CEST 2003 Daniel Veillard * SAX2.c: fixed a namespace error on attribute reporting bug pointed out by Tobias Reif * test/p3p result/p3p result/noent/p3p: this test case was wrong using xmlsn instead of xmlns... Thu Aug 28 18:25:07 CEST 2003 Igor Zlatkovic * include/libxml/globals.h include/libxml/xmlexports.h: fixed typos reported by Mark Vakoc Thu Aug 28 08:59:51 MDT 2003 John Fleck add: * doc/tutorial/api.html * doc/tutorial/ar01s09.html * doc/tutorial/includexpath.c updated * doc/tutorial/*.html fix my bad - forgot to check in new files when I last updated Thu Aug 28 14:31:13 CEST 2003 Igor Zlatkovic * win32/Makefile.bcb: new file, support for Borland C++ * xmllint.c: fixed time inclusion for various compilers Thu Aug 28 12:32:59 CEST 2003 Igor Zlatkovic * parser.c parserInternals.c DOCBparser.c HTMLparser.c: added few casts to shut the compiler warnings Thu Aug 28 12:23:51 CEST 2003 Igor Zlatkovic * win32/Makefile.* win32/configure.js: fixed for mingw Thu Aug 28 10:01:44 CEST 2003 Daniel Veillard * globals.c threads.c: fixing bug #120870 try to avoid problem with uninitialized mutexes Wed Aug 27 16:12:41 CEST 2003 Daniel Veillard * relaxng.c: fixed an error reporting bug in Relax-NG when we end up with multiple states, select the "best" one. Fix #120682 * result/relaxng/tutor11_2_3.err: small change resulting Wed Aug 27 11:25:25 CEST 2003 Daniel Veillard * xmlschemastypes.c: applied base64 support patch from Anthony Carrico Wed Aug 27 10:58:51 CEST 2003 Igor Zlatkovic * include/libxml/[threads-xpointer].h: realigned parameters after taint Wed Aug 27 09:59:54 CEST 2003 Igor Zlatkovic * include/libxml/xmlexports.h: fixed defs for Borland compiler, as reported by Eric Zurcher Tue Aug 26 15:54:04 CEST 2003 Daniel Veillard * relaxng.c: fixed bug #120386 again a problem introduced when trying to reuse automata for content validation. Fix a bug report problem on zeroOrMore * result/relaxng/tutor3_7_err: change slightly error reporting. Mon Aug 25 13:24:57 CEST 2003 Daniel Veillard * include/libxml/Makefile.am: make sure the new header will be included when generating a new distribution. Mon Aug 25 12:37:05 CEST 2003 Daniel Veillard * relaxng.c: fixed a couple of stupid bugs in the state allocation routines which led to bug #120040 and the ones reported by Martijn Faassen Mon Aug 25 12:37:23 CEST 2003 Igor Zlatkovic * include/libxml/parserInternals.h include/libxml/relaxng.h include/libxml/SAX.h include/libxml/SAX2.h: realigned the parameters after taint. Mon Aug 25 11:16:01 CEST 2003 Igor Zlatkovic * include/libxml/xmlversion.h.in: moved export defs to a separate file for consistency. * include/libxml/xmlexports.h: new file, contains export defs. Mon Aug 25 11:01:49 CEST 2003 Igor Zlatkovic * include/libxml/*.h genUnicode.py: exportability taint of the headers. Thu Aug 21 12:37:46 CEST 2003 Daniel Veillard * SAX.c: make the deprecated interfaces log an error message to be sure it won't get used. Thu Aug 21 00:50:32 CEST 2003 Daniel Veillard * Makefile.am SAX2.c include/libxml/Makefile.am include/libxml/SAX2.h: Adding new version of the SAX interface, it's not there yet, currently just preparing the work * globals.c parser.c SAX.c include/libxml/SAX.h include/libxml/globals.h include/libxml/parser.h: doing some refactoring of the SAXv1 interfaces, obsoleting a bunch of them while keeping functionalities, preparing SAX2 integration. * dict.c: small cleanup. Wed Aug 20 00:20:01 CEST 2003 Daniel Veillard * tree.c: fixes a small bug introduced in last commit and detected by valgrind. Tue Aug 19 16:54:18 CEST 2003 Daniel Veillard * dict.c hash.c: optimization when freeing hash tables. * parser.c xmlIO.c include/libxml/tree.h: some tuning of buffer allocations * parser.c parserInternals.c include/libxml/parser.h: keep a single allocated block for all the attributes callbacks, avoid useless malloc()/free() * tree.c: do not realloc() when growing a buffer if the buffer ain't full, malloc/memcpy/free avoid copying memory. Mon Aug 18 18:37:01 CEST 2003 Daniel Veillard * xmllint.c doc/xmllint.xml doc/xmllint.1: added option --dtdvalidfpi for Tobias Reif Mon Aug 18 14:03:03 CEST 2003 Daniel Veillard * dict.c include/libxml/dict.h Makefile.am include/libxml/Makefile.am: new dictionary module to keep a single instance of the names used by the parser * DOCBparser.c HTMLparser.c parser.c parserInternals.c valid.c: switched all parsers to use the dictionary internally * include/libxml/HTMLparser.h include/libxml/parser.h include/libxml/parserInternals.h include/libxml/valid.h: Some of the interfaces changed as a result to receive or return "const xmlChar *" instead of "xmlChar *", this is either insignificant from an user point of view or when the returning value changed, those function are really parser internal methods that no user code should really change * doc/libxml2-api.xml doc/html/*: the API interface changed and the docs were regenerated Sun Aug 17 23:05:38 CEST 2003 Daniel Veillard * parser.c: applied patch to xmlCleanupParser from Dave Beckett Sat Aug 16 22:53:42 HKT 2003 William Brack * doc/parsedecl.py, doc/libxml2-refs.xml, doc/API*.html: fixed part (2) of bug 119535 (wrong alpha case on filenames) Sat Aug 16 20:35:28 HKT 2003 William Brack * doc/API*.html, doc/html/*: regenerated API documentation for xmlsoft.org (part of Bug 119535) Fri Aug 15 14:58:37 HKT 2003 William Brack * encoding.c, threads.c, include/libxml/HTMLparser.h, doc/libxml2-api.xml: Minor changes to comments, etc. for improving documentation generation * doc/Makefile.am: further adjustment to auto-generation of win32/libxml2.def.src Fri Aug 15 02:24:20 CEST 2003 Daniel Veillard * News configure.in: preparing libxml2-2.5.10 release * doc/* : updated the doc and rebuilt Fri Aug 15 01:55:53 CEST 2003 Daniel Veillard * parser.c: fixing the xmlSAXParseDTD bug #119536 raised by Malcolm Tredinnick with the patch he suggested. Fri Aug 15 01:37:10 CEST 2003 Daniel Veillard * HTMLparser.c: allocation error #119784 raised by Oliver Stoeneberg Fri Aug 15 00:41:58 CEST 2003 Daniel Veillard * uri.c: fixing an use of strcpy() where both strings overlap pointed out by valgrind. Thu Aug 14 17:10:39 CEST 2003 Daniel Veillard * DOCBparser.c globals.c include/libxml/xmlmemory.h: get rid of some compilation warnings. * xinclude.c: fix the performance problem reported by Kevin Ruscoe plus some cleanup and better error reporting. Thu Aug 14 14:13:43 CEST 2003 Daniel Veillard * encoding.c: applied UTF-16 encoding handling patch provided by Mark Itzcovitz * encoding.c parser.c: more cleanup and fixes for UTF-16 when not having iconv support. Thu Aug 14 03:19:08 CEST 2003 Daniel Veillard * Makefile.am configure.in example/Makefile.am libxml.h nanoftp.c nanohttp.c xmllint.c: Applied patch from Mikhail Grushinskiy for mingw compiler on Windows. Thu Aug 14 02:28:36 CEST 2003 Daniel Veillard * parser.c: fixed the serious CPU usage problem reported by Grant Goodale * HTMLparser.c: applied patch from Oliver Stoeneberg about a free missing in htmlSAXParseDoc Tue Aug 12 22:48:10 HKT 2003 William Brack * doc/Makefile.am: Removed dependency from libxml2.def.src Tue Aug 12 18:55:08 HKT 2003 William Brack * autogen.sh: took away the requirement for automake-1.4, changed the messages for getting auto* tools to current gnu pages. * configure.in: added check for Linux Dec alpha requiring -ieee flag, fixed test for ipv6 * trionan.c: fixed problem for compiling on Linux Dec alpha using native compiler * doc/Makefile.am: implemented regeneration of win32/libxml2.def.src whenever libxml2-api.xml is changed. Mon Aug 11 17:02:23 CEST 2003 Daniel Veillard * parser.c: cleaning up a problem when parsing UTF-16 and libiconv is not used. Sun Aug 10 08:13:22 HKT 2003 William Brack * win32/libxml2.def.src: renerated with fixed libxml2-api.xml Sun Aug 10 00:22:55 CEST 2003 Daniel Veillard * News configure.in: preparing libxml2-2.5.9 release * doc/* : updated the doc and rebuilt Sat Aug 9 20:00:13 CEST 2003 Daniel Veillard * include/libxml/xmlreader.h doc/libxml2-api.xml: changing an enum definition to get a correct API XML description. This was apparently breaking Windows build. Sat Aug 9 13:41:21 CEST 2003 Daniel Veillard * HTMLparser.c: fixed a nasty bug #119387, bad heuristic from the progressive HTML parser front-end on large character data island leading to an erroneous end of data detection by the parser. Some cleanup too to get closer from the XML progressive parser. Sat Aug 9 00:42:47 HKT 2003 William Brack * win32/configure.js: Added in support for the ISO8859X module (patch provided by Jesse Pelton) Fri Aug 8 15:56:32 CEST 2003 Daniel Veillard * HTMLtree.c tree.c threads.c: hum try to avoid some troubles when the library is not initialized and one try to save, the locks in threaded env might not been initialized, playing safe * xmlschemastypes.c: apply patch for hexBinary from Charles Bozeman * test/schemas/hexbinary_* result/schemas/hexbinary_*: also added his tests to the regression suite. Fri Aug 8 18:47:38 HKT 2003 William Brack * win32/defgen.xsl, win32/libxml2.def.src: Bug 119343 (with apologies to Igor) - Enhanced handling of docb and nanohttp. Thu Aug 7 21:13:22 HKT 2003 William Brack * encoding.c: further small changes for warnings when configured with --with-iconv=no Wed Aug 6 12:32:11 HKT 2003 William Brack * error.c trionan.[ch] testThreads.c python/generator.py: further small changes to elminate most of the remaining warnings. Tue Aug 5 23:51:21 HKT 2003 William Brack * error.c HTMLparser.c testC14N.c testHTML.c testURI.c xmlcatalog.c xmlmemory.c xmlreader.c xmlschemastypes.c python/libxml.c include/libxml/xmlmemory.h: small changes to syntax to get rid of compiler warnings. No changes to logic. Mon Aug 4 22:40:54 CEST 2003 Daniel Veillard * doc/libxml2-api.xml doc/html/*: rebuilt the API and docs. Mon Aug 4 21:40:34 CEST 2003 Daniel Veillard * tree.c: fixed a small problem in the patch for #118763 * result/HTML/doc3.htm*: this reverts back to the previous result Sun Aug 3 21:41:49 EDT 2003 Daniel Veillard * doc/FAQ.html doc/xml.html: applied doc patch to xml.html and rebuilt, apparently some C++ wrappers are not available, c.f. bug #118943 Sun Aug 3 21:30:31 EDT 2003 Daniel Veillard * tree.c: fixing HTML attribute serialization bug #118763 applying a modified version of the patch from Bacek * result/HTML/doc3.htm*: this modifies the output from one test Sun Aug 3 21:02:30 EDT 2003 Daniel Veillard * tree.c include/libxml/tree.h: added a new API to split a QName without generating any memory allocation * valid.c: fixed another problem with namespaces on element in mixed content case * python/tests/reader2.py: updated the testcase with Bjorn Reese fix to reader for unsignificant white space * parser.c HTMLparser.c: cleanup. Sun Aug 3 20:55:40 EDT 2003 Daniel Veillard * catalog.c: trying to fix #118754 of possible recursion in the catalogs. Not fantastically happy about the current fix since it's likely to break under very thread intensive concurrent access to the catalog. Better solution might to keep the depth an extra argument to the resolution functions. Sun Aug 3 18:56:54 EDT 2003 Daniel Veillard * valid.c: fixed bug #118712 about mixed content, and namespaced element names. * test/valid/mixed_ns.xml result/valid/mixed_ns*: added a check in the regression tests Fri Aug 1 23:55:23 HKT 2003 William Brack Coninuing work on bug 118559 * DOCBparser.c: removed 2 unsed vars * xmlregexp.c: changed some numeric const to their enum symbols * xmlreader.c: changed one var define from int to enum (a little more to be done, awaiting co-ordination) * relaxng.c: deleted one unused var * xmllint.c: deleted some unused vars, changed one arg val from int to enum * testHTML.c, testDocbook.c: changed some arg vals to enum const * xmlIO.c: fixed typo from last night (small warning msg) Thu Jul 31 22:44:33 HKT 2003 William Brack Working on bug 118559 * error.c: deleted unused variable * parserInternals.c: deleted unneeded 'const' qualifier * parser.c: changed variable type for enum temp storage * xmlIO.c: changed debugging var to be inside #ifdef * valid.c: removed unused variable * HTMLparser.c: removed some unneeded 'const' qualifiers * xpath.c: added some type casts, removed some unused vars * xinclude.c: added one type cast * nanohttp.c: repositioned some #ifdef to avoid unused var * nanoftp.c: removed unused var Wed Jul 30 14:57:55 EDT 2003 Daniel Veillard * HTMLparser.c: applied a patch from William Brack about the problem of parsing very large HTML instance with comments as raised by Nick Kew Wed Jul 30 12:29:38 EDT 2003 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h: applying cleanup patch from Bjorn Reese for xmlTextReaderNodeType() and significant whitespace. There is an enum for node type values now. Wed Jul 30 11:08:21 EDT 2003 Daniel Veillard * encoding.c: applying patch from Peter Jacobi to added ISO-8859-x encoding support when iconv is not available * configure.in include/libxml/xmlversion.h.in include/libxml/xmlwin32version.h.in: added the glue needed at the configure level and made it the default for Windows Tue Jul 29 16:43:48 EDT 2003 Daniel Veillard * python/generator.py python/libxml.c python/libxml2class.txt: patch from Joachim Bauch + cleanup for Relax NG error callbacks in python Tue Jul 29 12:46:08 EDT 2003 Daniel Veillard * parser.c parserInternals.c tree.c: applied Peter Jacobi encoding cleanup patch, and also avoided a possible memory leak Tue Jul 29 09:28:09 EDT 2003 Daniel Veillard * encoding.c: fix the previous commit Tue Jul 29 12:28:17 HKT 2003 William Brack * HTMLparser.c: fixed problem with comments reported by Nick Kew * encoding.c: added routines xmlUTF8Size and xmlUTF8Charcmp for some future cleanup of UTF8 handling Mon Jul 28 16:39:14 EDT 2003 Daniel Veillard * xpath.c: applied a change suggested by Sean Griffin in bug #118494 about a memory leak in EXSLT Sun Jul 27 14:30:56 EDT 2003 Daniel Veillard * relaxng.c: fixed a Relax-NG compilation/streaming bug introduced when fixing the previous Relax-NG bugs * result/relaxng/*: This slightly changes the output messages of some regression tests. * configure.in: added support of -with-fexceptions for nested C++ support. Thu Jul 24 15:46:02 MDT 2003 John Fleck * doc/tutorial/apa.html * doc/tutorial/apb.html * doc/tutorial/apc.html * doc/tutorial/apd.html * doc/tutorial/ape.html * doc/tutorial/apf.html * doc/tutorial/apg.html * doc/tutorial/aph.html * doc/tutorial/ar01s02.html * doc/tutorial/ar01s03.html * doc/tutorial/ar01s04.html * doc/tutorial/ar01s05.html * doc/tutorial/ar01s06.html * doc/tutorial/ar01s07.html * doc/tutorial/ar01s08.html * doc/tutorial/index.html * doc/tutorial/ix01.html * doc/tutorial/xmltutorial.pdf * doc/tutorial/xmltutorial.xml update tutorial with XPath example Thu Jul 24 17:07:06 IST 2003 Daniel Veillard * SAX.c parser.c: fixing a bug about a special case of namespace handling, this closes bug #116841 Wed Jul 23 20:52:36 IST 2003 Daniel Veillard * relaxng.c result/relaxng/*: checked and fixed the compilation of RNG schemas, fixes a couple of bugs #117097 and #117001 . This slightly changes the output messages of some regression tests. Wed Jul 23 15:15:08 IST 2003 Daniel Veillard * xmlreader.c: fixed an out of bound error #118052 , the good part if that base64 code was not in use yet ... Tue Jul 22 19:42:15 MDT 2003 John Fleck * doc/xmllint.html include html version of the xmllint man page, so an up-to-date version is visible on the Web Mon Jul 21 21:53:43 IST 2003 Daniel Veillard * xinclude.c include/libxml/xinclude.h: added a new API xmlXIncludeProcessTree() to process XInclude only on a subtree this should fix bug #115385 Fri Jul 18 17:11:42 CEST 2003 Daniel Veillard * relaxng.c include/libxml/relaxng.h: adding Get interface for the error callback and parameters of parsing and validation contexts * xmlreader.c: patch to fix bug #117702 about incomplete Read() on text nodes. Wed Jul 16 23:15:53 CEST 2003 Daniel Veillard * parserInternals.c: patch from Dodji Seketeli about UTF16 BOM when using the push XML parser. * result/utf16bom.xml result/noent/utf16bom.xml test/utf16bom.xml: added the test to the regression suite. Tue Jul 15 22:03:13 CEST 2003 Daniel Veillard * globals.c: add xmlThrDefMutex = NULL in xmlCleanupGlobals() as suggested by Rob Richards Tue Jul 15 15:30:55 CEST 2003 Daniel Veillard * DOCBparser.c HTMLparser.c entities.c parser.c relaxng.c xmlschemas.c xpath.c: removed some warnings by casting xmlChar to unsigned int and a couple of others. Fri Jul 11 16:44:22 CEST 2003 Daniel Veillard * xmlschemastypes.c: fixes a segfault on empty hexBinary strings Thu Jul 10 16:02:47 CEST 2003 Daniel Veillard * nanoftp.c nanohttp.c: cleanup patches from Peter Breitenlohner Tue Jul 8 16:02:19 CEST 2003 Daniel Veillard * globals.c threads.c: fixes some problem when freeing unititialized mutexes Tue Jul 8 14:15:07 CEST 2003 Daniel Veillard * nanoftp.c nanohttp.c: the modules should not import directly, some cleanups * xmlschemas.c: Peter Sobisch found a nasty bug in the Schemas validation code. Mon Jul 7 18:00:51 CEST 2003 Daniel Veillard * win32/configure.js: Jesse Pelton pointed out a problem in the javascript code. Mon Jul 7 16:39:31 CEST 2003 Daniel Veillard * NEWS doc/*: regenerated * nanoftp.c nanohttp.c: might fix includes problems with the Ipv6 support on solaris * tree.c: patch from Markus Keim about xmlHasNsProp() on attributes defined as #IMPLIED Sun Jul 6 23:09:13 CEST 2003 Daniel Veillard * configure.in doc/*: preparing release 2.5.8 * nanohttp.c: changed some preprocessor block * xmlschemastypes.c: applied patch from Charles Bozeman adding hexBinary schema datatype and adding support for totalDigits and fractionDigits facets. Sun Jul 6 19:56:18 CEST 2003 Daniel Veillard * debugXML.c xpath.c: fixed 2 bugs pointed in #116448 Sun Jul 6 19:34:17 CEST 2003 Daniel Veillard * xinclude.c: fixed bug #116095 removing the error message when reapplying XInclude to a document. Sat Jul 5 22:40:23 CEST 2003 Daniel Veillard * xmlIO.c: applied small changes to portability layer for compilation on DJGPP Ms-DOS compiler. Sat Jul 5 22:30:25 CEST 2003 Daniel Veillard * parser.c HTMLparser.c: use the character() SAX callback if the cdataBlock ain't defined. * xpath.c: fix bug #115349 allowing compilation when configured with --without-xpath since the Schemas code needs NAN and co. Sat Jul 5 00:51:30 HKT 2003 William Brack Fixed problem with multi-threading, shown by the test program testThreads. After fix, ran mutiple tests on various speed machines (single and dual processor X86), which all seem okay. * catalog.c: added missing xmlRMutexUnlock in xmlLoadCatalog * threads.c: added missing initialisation for condition variable in xmlNewRMutex. Sat Jun 21 16:10:24 CEST 2003 Daniel Veillard Applying IPv6 patch from Archana Shah closing bug #114837 * configure.in: Added checks for IPv6 support and getaddrinfo(). * acconfig.h: Defined HAVE_GETADDRINFO and SUPPORT_IP6. * config.h.in: Defined HAVE_GETADDRINFO and SUPPORT_IP6. * nanoftp.c: Structure xmlNanoFTPCtxt contains either sockaddr_storage field or sockaddr_in field, depending upon the availability of IPv6 support. have_ipv6(): Added to check for run-time IPv6 support. (xmlNanoFTPScanURL), (xmlNanoFTPUpdateURL), (xmlNanoFTPScanProxy): Modified to parse a URI with IPv6 address given in []. (xmlNanoFTPConnect): Changed to use getaddrinfo for address resolution, if it is available on the system, as gethostbyname does not return IPv6 addresses on some platforms. (xmlNanoFTPGetConnection): Modified type of dataAddr variable to sockaddr~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'v|C_storage or sockaddr_in depending upon the IPv6 support. Sending EPSV, EPRT or PASV, PORT depending upon the type of address we are dealing with. * nanohttp.c: (have_ipv6): Added to check for run-time IPv6 support. (xmlNanoHTTPScanURL), (xmlNanoHTTPScanProxy): Modified to parse a URI with IPv6 address given in []. (xmlNanoHTTPConnectHost): Modified to use getaddrinfo if it is available on the system. Also IPv6 addresses will be resolved by gethostbyname only if IPv6 run-time support is available. (xmlNanoHTTPConnectAttempt): Modified to deal with IPv6 address. Sat Jun 14 18:46:51 CEST 2003 Igor Zlatkovic * win32/configure.js include/win32config.h include/libxml/xmlversion.h.in: Applied the patch for BCB by Eric Zurcher. Fri Jun 13 14:27:19 CEST 2003 Daniel Veillard * doc/Makefile.am doc/html/*: reverted back patch for #113521, due to #115104 and while fixing #115101 . HTML URLs must not be version dependant. Fri Jun 13 12:03:30 CEST 2003 Daniel Veillard * entities.c: do not generate " for " outside of attributes * result//*: this changes the output of some tests Mon Jun 9 12:28:58 CEST 2003 Daniel Veillard * parser.c xmlIO.c: trying to fix #114277 about when file remapping and escaping should really be attempted. Mon Jun 9 11:06:09 CEST 2003 Daniel Veillard * doc/*: applied a patch from Gman for building docs * valid.c xmllint.c include/libxml/valid.h: applied a patch from Gary Pennington to provide an allocator for xmlValidCtxt * xmlreader.c: applied patch from Jacek Konieczny fixing bug #113580 about data not being passed immediately. Thu Jun 5 11:31:02 CEST 2003 Daniel Veillard * tree.c: applied a couple of patches from Mark Itzcovitz to handle saving back "UTF-16" documents. Mon Jun 2 21:56:15 MVT 2003 Daniel Veillard * relaxng.c xmlschemas.c include/libxml/schemasInternals.h: commiting some work done while in the Maldives (hence the timezone on the laptop !) * result/schemas/length3* test/schemas/deter0_* test/schemas/group0_*: some tests added too Mon Jun 2 15:34:17 CEST 2003 Daniel Veillard * encoding.c: small fix * xmlIO.c: fixed an error message Tue May 20 14:21:23 CEST 2003 Daniel Veillard * parserInternals.c: fixing Red Hat bug #91013 where xmllint was accepting an improper UTF8 sequence Sat May 17 12:53:11 CEST 2003 Igor Zlatkovic * threads.c: applied the patch from Stphane Bidoul for getting rid of extra threads in a dynamic library. * win32/configure.js: threads default to 'native' now. Fri May 16 13:17:52 EDT 2003 Daniel Veillard * HTMLtree.c: fixing bug #112904: html output method escaped plus sign character in URI attribute. Thu May 15 18:06:18 EDT 2003 Daniel Veillard * build_glob.py global.data globals.c parser.c include/libxml/globals.h: patch from Stphane Bidoul for setting up threads global defaults. * doc/libxml2-api.xml: this extends the API with new functions * python/tests/Makefile.am python/tests/reader2.py python/tests/thread2.py: integrated the associated testcase and fixed the error string used in reader2 Wed May 14 14:56:46 EDT 2003 Daniel Veillard * configure.in libxml.spec.in python/Makefile.am: trying to conciliate --with-python= requirements and RPM builds, a PITA really... Tue May 13 18:30:34 EDT 2003 Daniel Veillard * HTMLparser.c: oops last commit introduced a memory leak. Tue May 13 18:10:38 EDT 2003 Daniel Veillard * xmllint.c doc/xmllint.xml: added --nonet option * doc/Makefile.am: fixing #112803 by adding --nonet when calling xsltproc or xmllint * doc/xmllint.xml doc/xmllint.1: also added --schema doc and rebuilt * HTMLparser.c: cleaned up the HTML parser context build when using an URL Tue May 13 16:35:04 EDT 2003 Daniel Veillard * libxml.spec.in: added a comment about bug #112902 Mon May 12 21:58:00 EDT 2003 William Brack * minor cleanup of configure '--help' display * error.c: enhanced xmlParserPrintFileContext to fix bug #109942 Mon May 12 17:53:30 EDT 2003 Daniel Veillard * tree.c: PI nodes in external subset were not freed :-\ fixes bug #112842 Mon May 12 11:23:27 EDT 2003 Daniel Veillard * xmllint.c: added --schema option to run WXS schema validation * xmlschemas.c xmlschemastypes.c include/libxml/schemasInternals.h: tried to improve error reporting in the Schema code, some cleanup too. Sun May 11 16:13:20 EDT 2003 Daniel Veillard * xmlschemas.c: fixed some problems in the handling of errors, and attributes addressed by references. * test/schemas/* result/schemas/*: dropped the verbosity level and added a couple of new tests Sat May 10 16:01:21 EDT 2003 Daniel Veillard * relaxng.c: Stphane Bidoul found an off by one addressing error on the error handling. Fri May 9 19:08:20 EDT 2003 Daniel Veillard * xmlschemastypes.c: trying to fix #112673 Fri May 9 18:14:16 EDT 2003 Daniel Veillard * DOCBparser.c catalog.c parser.c relaxng.c: removed multiple warning, this fixed a bug and should close #111574 Fri May 9 15:34:32 EDT 2003 Daniel Veillard * xmlschemas.c: fixing bug #104081 with xs:all with an element holding minOccurs="0" * test/schemas/all_* result/schemas/all_*: added some regression tests for that bug * xmllint.c xmlreader.c: patches from Joerg Schmitz-Linneweber and Garry Pennington to compile without schemas support. Thu May 1 10:02:35 CEST 2003 Daniel Veillard * tree.c: fixed a problem with xmlUnlinkNode() for DTDs. Wed Apr 30 14:16:08 CEST 2003 Daniel Veillard * xml2-config.in: try to fix Red hat bug #89957, do not output -L/usr/lib64 * xmlreader.c: fixed a typo in a comment Tue Apr 29 07:32:02 MDT 2003 John Fleck * doc/tutorial/aph.html, ix01.html forgot to cvs add the new files. Thanks to Roland van Laar for pointing this out Tue Apr 29 14:36:49 CEST 2003 Daniel Veillard * xmlschemas.c doc/libxml2-api.xml: fixing a function comment * doc/Makefile.am doc/apibuild.py doc/gnome-xml.sgml: switching to the XML/XSLT doc generation closing #111799 * doc/html/*: complete update of the HTML results Mon Apr 28 14:51:41 CEST 2003 Igor Zlatkovic * win32/defgen.xsl: fixed the conditional for unicode map, removed hardcoded schema entries Mon Apr 28 02:19:00 CEST 2003 Igor Zlatkovic * win32/defgen.xsl: new file, stylesheet for generating win32/libxml2.def.src from doc/libxml2-api.xml * win32/libxml2.def.src: is autogenerated from now on, changes to this file will not appear here anymore Mon Apr 28 00:12:11 CEST 2003 Daniel Veillard * win32/configure.js python/setup.py.in: applied patch from Stphane Bidoul for the Python bindings on the new release. Sun Apr 27 17:56:21 CEST 2003 Igor Zlatkovic * debugXML.c: included libxml/uri.h for xmlCanonicPath declaration * win32/configure.js: thread-enabled build is now default * win32/libxml2.def.src: added more exports Sun Apr 27 00:23:05 CEST 2003 Daniel Veillard * NEWS doc/*.xsl doc/*.html: updated the web site separated developers from common pages, made the transition to XHTML1, added validity checking to the makefile rules. Sat Apr 26 23:17:51 CEST 2003 Daniel Veillard * parser.c: fix for xmlIOParseDTD same as previous and reported by Petr Pajas Sat Apr 26 15:26:04 CEST 2003 Daniel Veillard * parser.c: applied fix to xmlSAXParseDTD from Malcolm Tredinnick closing #111638 Sat Apr 26 14:00:58 CEST 2003 Daniel Veillard * python/generator.py: fixed a problem in the generator where the way functions are remapped as methods on classes was not symetric and dependant on python internal hash order, as reported by Stphane Bidoul Fri Apr 25 21:52:33 MDT 2003 John Fleck * doc/tutorial: xmltutorial.xml xmltutorial.pdf *.html add appendix on generating compiler flags, more indexing Sat Apr 26 01:10:48 CEST 2003 Daniel Veillard * triodef.h vms/build_libxml.com: applied patch from Craig A. Berry to get libxml-2.5.7 to compile on OpenVMS Fri Apr 25 18:42:35 CEST 2003 Daniel Veillard * parser.c: fixing an xmlParseDTD bug raised by Petr Pajas Fri Apr 25 15:20:29 CEST 2003 Daniel Veillard * doc/Makefile.am doc/xmlcatalog.1 doc/xmlcatalog_man.xml doc/xmllint.1 doc/xmllint.xml: automated the generation of the man page based on xsltproc and a stylesheet PI in the XML. Fri Apr 25 12:37:33 CEST 2003 Daniel Veillard * doc/xmllint.*: trying to fix #110541 where   generated character preventing rendering by the man command. Fri Apr 25 01:09:23 CEST 2003 Daniel Veillard * NEWS configure.in: preparing release 2.5.7 * doc/*: updated and rebuilt the docs * doc/apibuild.py: fixed the script Thu Apr 24 19:11:12 CEST 2003 Daniel Veillard * Makefile.am doc/apibuild.py: make sure the OOM code don't get in the way of the builds * doc/libxml2-api.xml python/libxml2class.txt: automatic update Thu Apr 24 18:01:46 CEST 2003 Daniel Veillard * Makefile.am testOOM.c testOOMlib.[ch] : integrated the Out Of Memory test from Havoc Pennington #109368 * SAX.c parser.c parserInternals.c tree.c uri.c valid.c xmlmemory.c xmlreader.c xmlregexp.c include/libxml/tree.h include/libxml/parser.h: a lot of memory allocation cleanups based on the results of the OOM testing * check-relaxng-test-suite2.py: seems I forgot to commit the script. Wed Apr 23 17:16:41 CEST 2003 Daniel Veillard * xmlschemastypes.c: trivial fix for 109774 removing a warning Wed Apr 23 15:49:32 CEST 2003 Daniel Veillard * DOCBparser.c SAX.c catalog.c debugXML.c parser.c: try to find more places where xmlCanonicPath() must be used to convert filenames to URLs, trying to fix #111088 Wed Apr 23 09:35:12 CEST 2003 Daniel Veillard * python/libxml.c python/libxml.py: applied patch from Brent M Hendricks adding binding for xmlCatalogAddLocal Tue Apr 22 15:18:01 CEST 2003 Daniel Veillard * HTMLparser.c: tried to fix #98879 again in a more solid way. Tue Apr 22 13:58:43 CEST 2003 Igor Zlatkovic * win32/libxml2.def.src: added more exports from the relaxng and xmlreader clan Tue Apr 22 10:35:13 CEST 2003 Daniel Veillard * SAX.c test/valid/ns* test/result/ns*: applied the patch provided by Brent Hendricks fixing #105992 and integrated the examples in the testsuite. Tue Apr 22 01:06:09 CEST 2003 Daniel Veillard * TODO: updated a bit * configure.in: fixed the comment, threads now default to on * parserInternals.c: fixed an erroneous xmlMallocAtomic() call Mon Apr 21 23:33:38 CEST 2003 Daniel Veillard * globals.c libxml.h parser.c parserInternals.c tree.c xmllint.c xmlreader.c include/libxml/parser.h: a lot of performance work especially the speed of streaming through the reader and push interface. Some thread related optimizations. Nearly doubled the speed of parsing through the reader. Sun Apr 20 10:36:05 MDT 2003 John Fleck * doc/xmllint.xml * doc/xmllint.1 update man page to explain use of --stream Sat Apr 19 02:03:24 CEST 2003 Daniel Veillard * DOCBparser.c HTMLparser.c c14n.c catalog.c encoding.c globals.c nanohttp.c parser.c parserInternals.c relaxng.c tree.c uri.c xmlmemory.c xmlreader.c xmlregexp.c xpath.c xpointer.c include/libxml/globals.h include/libxml/xmlmemory.h: added xmlMallocAtomic() to be used when allocating blocks which do not contains pointers, add xmlGcMemSetup() and xmlGcMemGet() to allow registering the full set of functions needed by a garbage collecting allocator like libgc, ref #109944 Fri Apr 18 16:37:41 CEST 2003 Daniel Veillard * configure.in: switched to have thread support enabled by default, didn't got troubles with ABI compatibility on Linux, hope it won't break on strange OSes, if yes, report the system ID * doc/libxml2-api.xml: just rebuilt the API Fri Apr 18 14:31:15 CEST 2003 Daniel Veillard * libxml.h include/libxml/parser.h parser.c xmlIO.c DOCBparser.c: added support for large file, tested with a 3+GB instance, and some cleanup. * catalog.c: added a TODO * Makefile.am: added some "make tests" comments Thu Apr 17 14:51:57 CEST 2003 Daniel Veillard * relaxng.c: some cleanups * doc/xmlreader.html: extended the document to cover RelaxNG and tree operations * python/tests/Makefile.am python/tests/reader[46].py: added some xmlReader example/regression tests * result/relaxng/tutor*.err: updated the output of a number of tests Thu Apr 17 11:35:37 CEST 2003 Daniel Veillard * relaxng.c: valgrind pointed out an uninitialized variable error. Thu Apr 17 11:06:28 CEST 2003 Daniel Veillard * include/libxml/relaxng.h relaxng.c include/libxml/xmlreader.h xmlreader.c: augnemting the APIs, cleanups. * parser.c: cleanup bug #111005 * xmlIO.c: added some missing comments Wed Apr 16 17:46:50 CEST 2003 Daniel Veillard * relaxng.c xmllint.c: more work on RelaxNG streaming validation trying to improve the subset compiled, and more testing. * doc/downloads.html doc/xml.html doc/xmlmem.html: some updates on the documentation * test/relaxng/tutor11_1_3.xml: fixes the DTD path * result/relaxng/*.err: fix some of the outputs Wed Apr 16 01:28:15 CEST 2003 Daniel Veillard * relaxng.c xmlreader.c xmllint.c include/libxml/relaxng.h include/libxml/xmlreader.h: implemented streaming of RelaxNG (when possible) on top of the xmlReader interface, provided it as xmllint --stream --relaxng .rng .xml This seems to mostly work. * Makefile.am: updated to test RelaxNG streaming Mon Apr 14 18:08:33 CEST 2003 Daniel Veillard * relaxng.c include/libxml/relaxng.h: integrated the regexp based validity checking of fragments of the document for which the RNG can be compiled to regexps. Works on all regression tests, only fix needed is related to error messages. Sun Apr 13 21:51:00 CEST 2003 Daniel Veillard * relaxng.c xmlregexp.c include/libxml/xmlautomata.h include/libxml/xmlregexp.h: Starting work precompiling parts of RelaxNG schemas. Not plugged onto validity checking yet, just the regexp building part. Needed to extend some of the automata and regexp APIs. Fri Apr 11 21:36:21 CEST 2003 Daniel Veillard * xmllint.c xmlreader.c include/libxml/xmlreader.h: make sure xmllint --stream and xmllint --stream --valid returns errors code appropriately Fri Apr 11 10:59:24 CEST 2003 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h: Added the Expand() and Next() operation to work on subtrees within the reader framework. * doc/libxml2-api.xml python/libxml2class.txt: resulting updates * python/tests/reader5.py: added an example for those new functions of the reader. Thu Apr 10 23:38:13 CEST 2003 Daniel Veillard * HTMLtree.c: patch from Vasily Tchekalkin to fix #109865 Thu Apr 10 15:32:44 CEST 2003 Daniel Veillard * xmlreader.c: fixing HasValue for namespace as raised by Denys Duchier Wed Apr 9 14:07:18 CEST 2003 Daniel Veillard * HTMLparser.c include/libxml/HTMLparser.h: exported htmlCreateMemoryParserCtxt() it was static Wed Apr 9 13:21:48 CEST 2003 Daniel Veillard * xmlschemas.c xmlschemastypes.c include/libxml/xmlschemas.h: update from Charles Bozeman for date and duration types * test/schemas/date_0.* test/schemas/dur_0.* result/schemas/date_0.* result/schemas/dur_0.*: updated too Mon Apr 7 12:19:26 CEST 2003 Daniel Veillard * tree.c valid.c xpath.c include/libxml/tree.h include/libxml/valid.h: fixing bug #107129, removing excessive allocation and calls to *printf in the code to build QName strings. Sat Apr 5 11:41:36 CEST 2003 Igoe Zlatkovic * win32/libxml2.def.src: fixed conditional exports, reported by Luke Murray. Fri Apr 4 18:08:00 CEST 2003 Daniel Veillard * parser.c: fixed a possible problem with xmlRecoverMemory() Thu Apr 3 17:24:44 CEST 2003 Daniel Veillard * trio.c trio.h triodef.h trionan.c trionan.h triop.h triostr.c triostr.h: Bjorn sent an update for the TRIO portability layer. Tue Apr 1 21:57:26 CEST 2003 Igor Zlatkovic * win32/libxml2.def.src: exported new functions Tue Apr 1 13:09:46 CEST 2003 Daniel Veillard * configure.in NEWS: preparing release 2.5.6 * doc/*: updated and rebuilt the docs Tue Apr 1 11:52:15 CEST 2003 Daniel Veillard * SAX.c: fixed an uninitialized memory access pointed by valgrind on C14Ntests Tue Apr 1 00:12:28 CEST 2003 Daniel Veillard * relaxng.c: one more fixup of error message reporting Mon Mar 31 18:36:32 CEST 2003 Daniel Veillard * relaxng.c: more work on bug #109225, and fixed an uninitialized variable pointed out by valgrind Mon Mar 31 18:05:22 CEST 2003 Daniel Veillard * relaxng.c: try to work on bug #109225 and provide better error reports. * result/relaxng/* : this change the output of a number of tests * xinclude.c: fixing the parsed entity redefinition problem raised on the list. * test/schemas/date_0.xsd: updated the date test c.f. E2-12 Mon Mar 31 13:19:04 CEST 2003 Daniel Veillard * xmlschemastypes.c: fixed date comparison to handle the tzo The only failures left are disagreements on Notations and '+1' not being allowed for ulong, uint, ushort and ubyte. Mon Mar 31 12:11:47 CEST 2003 Daniel Veillard * xmlschemastypes.c: fixed gMonth parsing routine accordingly to the XML Schemas errata http://www.w3.org/2001/05/xmlschema-errata#e2-12 Sun Mar 30 23:04:18 CEST 2003 Daniel Veillard * relaxng.c xmlschemastypes.c: more work on XML Schemas datatypes and facets support. Currently only schemas with binHex or base64 don't compile. A few error left in the test suite: found 1035 test instances: 919 success 23 failures most are gdate or gdateyear failing check, and a few cases where James clark tests results are strange. * valid.c: allow to reuse the Notation checking routine without having a validation context. * SAX.c: removed a #if 0 Sat Mar 29 17:35:05 CET 2003 Daniel Veillard * xinclude.c: forgot to apply one check from #106931 patch * xmlschemastypes.c: more work on XML Schemas datatypes Sat Mar 29 11:49:25 CET 2003 Daniel Veillard * relaxng.c include/libxml/relaxng.h xmlschemastypes.c: more work on cleaning up XML Schemas datatypes based on James Clark tests test/xsdtest/xsdtest.xml Fri Mar 28 14:24:08 CET 2003 Daniel Veillard * relaxng.c: implemented comparisons for Schemas values. * xmlschemastypes.c include/libxml/xmlschemastypes.h: fixed some bugs in duration handling, comparisons for durations and decimals, removed all memory leaks pointed out by James testsuite. Current status is now found 238 test schemas: 197 success 41 failures found 1035 test instances: 803 success 130 failures Fri Mar 28 00:41:55 CET 2003 Daniel Veillard * xmlschemas.c include/libxml/xmlschemas.h: fixed bugs and memory leaks in the W3C XML Schemas code * xmlschemastypes.c: implemented nonPositiveInteger * test/schemas/length2_0.xsd result/schemas/length2_0_0.err: fixed the test and result. Thu Mar 27 22:23:07 CET 2003 Daniel Veillard * HTMLparser.c tree.c: two patches from James Bursa on the HTML parser and a typo * xmlschemastypes.c: reindenting, fixing a memory access problem with dates. Thu Mar 27 15:53:35 CET 2003 Daniel Veillard * parser.c: fixing #109227 providing more context in case of start/end tag mismatch * python/tests/ctxterror.py python/tests/readererr.py: update the tests accordingly Thu Mar 27 15:22:41 CET 2003 Daniel Veillard * xinclude.c: should fix #109327 errors on memory accesses Thu Mar 27 15:06:13 CET 2003 Daniel Veillard * HTMLtree.c: Fixed reopening of #78662

is an URI reference Wed Mar 26 22:38:39 CET 2003 Daniel Veillard * xpath.c: fixed bug #109160 on non-ASCII IDs Wed Mar 26 17:30:37 CET 2003 Daniel Veillard * parser.c: Norm suggested a nicer error message for xml:space values errors Wed Mar 26 01:34:19 CET 2003 Daniel Veillard * xpath.c include/libxml/xpath.h: first part of the fix to performance bug #108905, adds xmlXPathOrderDocElems() providing document order for nodes. * python/libxml.c: Python may require TRIO as Albert Chin pointed out Tue Mar 25 16:07:00 CET 2003 Daniel Veillard * xmlschemastypes.c: removing a warning with Sun compiler bug #109154 Tue Mar 25 07:02:56 MST 2003 John Fleck * doc/xmllint.xml * doc/xmllint.1 update xmllint man page with --relaxng option Tue Mar 25 12:07:03 CET 2003 Daniel Veillard * python/setup.py.in : was missing "drv_libxml2.py" Mon Mar 24 19:38:05 CET 2003 Daniel Veillard * tree.c xpath.c: some changes related to the new way of handling Result Value Tree, before 2.5.5 Mon Mar 24 16:36:23 CET 2003 Daniel Veillard * configure.in NEWS: preparing release 2.5.5 * doc/* : updated the documentation and regenerated it. Mon Mar 24 14:56:01 CET 2003 Daniel Veillard * xpath.c: fixed some problems related to #75813 about handling of Result Value Trees Sun Mar 23 22:57:20 CET 2003 Daniel Veillard * uri.c: applied a set of patches from Lorenzo Viali correcting URI parsing errors. Sun Mar 23 22:00:14 CET 2003 Daniel Veillard * parser.c: validity status was not passed back when validating in entities, but raised by Oliver Fischer Sun Mar 23 21:30:50 CET 2003 Daniel Veillard * HTMLtree.c: avoid escaping ',' in URIs Sun Mar 23 12:57:00 CET 2003 Daniel Veillard * parser.c: fixing bug #108976 get the ID/REFs to reference the ID in the document content and not in the entity copy * SAX.c include/libxml/parser.h: more checking of the ID/REF stuff, better solution for #107208 * xmlregexp.c: removed a direct printf, dohhh * xmlreader.c: fixed a bug on streaming validation of empty elements in entities * result/VC/ElementValid8 test/VCM/v20.xml result/valid/xhtml1.xhtml: cleanup of the validation tests * test/valid/id* test/valid/dtds/destfoo.ent result/valid/id*: added more ID/IDREF tests to the suite Sat Mar 22 23:38:08 CET 2003 Daniel Veillard * xmlreader.c: fixed #107043 removing 2 warnings with Sun One compiler. Sat Mar 22 18:50:45 CET 2003 Daniel Veillard * relaxng.c: valgrind'ed and cleaned up a couple of memory issues. Sat Mar 22 16:15:50 CET 2003 Daniel Veillard * SAX.c: fix bug #107208 avoid false duplicates when ID/REFs are defined in entities content Sat Mar 22 15:53:27 CET 2003 Daniel Veillard * SAX.c: Fixed validation bug #108858 on namespace names using entities and reported by Brent Hendricks * xmllint.c: report xmlTextReaderHasValue() result in --stream --debug output. Sat Mar 22 13:32:39 CET 2003 Daniel Veillard * xmlreader.c: fixed bug #108801 reported by Malcolm Tredinnick about the DocType node not being reported sometimes. * python/tests/reader.py: added to test to the regression checks Sat Mar 22 01:57:40 CET 2003 Daniel Veillard * xmlreader.c: fixed bug #108546 on long CDATA (or text nodes) reported by Edd Dumbill Sat Mar 23 01:00:24 CET 2003 Daniel Veillard * HTMLparser.c parser.c parserInternals.c: patch from johan@evenhuis.nl for #107937 fixing some line counting problems, and some other cleanups. * result/HTML/: this result in some line number changes Fri Mar 21 22:19:14 CET 2003 Daniel Veillard * configure.in Makefile.am: fixed Red Hat bug #86118 use libxml2.spec instead of libxml.spec * relaxng.c: fixed some of the error reporting excessive verbosity * catalog.c debugXML.c valid.c xmlreader.c xmlschemas.c xpath.c xmlschemastypes.c: removed some warnings from gcc * doc/libxml2-api.xml: rebuilt Fri Mar 21 17:25:23 CET 2003 Daniel Veillard * relaxng.c: another optimization, for choice this time * result/relaxng/spec1* result/relaxng/tutor12_1* result/relaxng/tutor3_7: cleanups. Fri Mar 21 13:41:23 CET 2003 Daniel Veillard * relaxng.c: fixed xmlRelaxNGNodeMatchesList * test/relaxng/testsuite.xml: augmented the test suite * result/relaxng/spec1* result/relaxng/tutor12_1*: this fixes some schemas validation tests in the presence of foreign namespaces. Fri Mar 21 02:23:34 CET 2003 Daniel Veillard * relaxng.c: added another interleave speedup. Thu Mar 20 17:22:00 CET 2003 Daniel Veillard * xmlschemastypes.c: added integer and fixed one of the IDREFS regression tests pbm * result/relaxng/docbook_0.err: updated Wed Mar 19 21:58:47 CET 2003 Daniel Veillard * valid.c xmlschemastypes.c: attempt to cope with ID/IDREF(S) declared both in the DTD and in the Schemas * relaxng.c: more debug, added a big optimization for * test/relaxng/testsuite.xml: augmented the testsuite * test/relaxng/ result/relaxng: added the RelaxNG spec and a DocBook example to the regression tests Wed Mar 19 11:34:10 CET 2003 Daniel Veillard * check-xsddata-test-suite.py: cosmetic change for output * relaxng.c: try to minimize calls to malloc/free for states. Tue Mar 18 17:50:31 CET 2003 Daniel Veillard * tree.c: removed a warning * xmlschemastypes.c: more cleanup, added ENTITY and ENTITIES support * check-relaxng-test-suite.py check-xsddata-test-suite.py: cleanup/improvements of the regression tests batch * test/relaxng/testsuite.xml: augmented libxml2 own testsuite Tue Mar 18 12:36:22 CET 2003 Daniel Veillard * relaxng.c: fixed error msg cleanup deallocation * xmlschemastypes.c: added a function to handle lists of atomic types, added support for IDREFS Tue Mar 18 01:28:15 CET 2003 Daniel Veillard * relaxng.c valid.c xmlschemastypes.c: added Datatype ID and IDREF, usable from RelaxNG now * include/libxml/xmlschemastypes.h: need to add a new interface because the validation modifies the infoset * test/relaxng/testsuite.xml: extended the testsuite Mon Mar 17 16:34:07 CET 2003 Daniel Veillard * relaxng.c: fixed the last core RelaxNG bug known #107083, shemas datatype ID/IDREF support still missing though. * xmlreader.c: fix a crashing bug with prefix raised by Merijn Broeren * test/relaxng/testsuite.xml: augmented the testsuite with complex inheritance tests Sun Mar 16 18:45:50 CET 2003 Daniel Veillard * relaxng.c: switched back to the previous Relax-NG code base, the derivation algorithm need severe constraining code to avoid combinatorial explosion. Fixed the problem with Sebastian Rahtz TEI based example and other bugs * result/relaxng/*err: updated the results * test/relaxng/testsuite.xml: started a new test suite Sat Mar 15 22:26:46 CET 2003 Daniel Veillard * relaxng.c include/libxml/relaxng.h: After coming to the conclusion that the original RelaxNG validation code was un-fixeable, it got rewritten to use the derivation algorithm from James Clark and redebugged it (nearly) from scratch: found 373 test schemas: 372 success 1 failures found 529 test instances: 529 success 0 failures Tue Mar 11 12:08:23 CET 2003 Daniel Veillard * SAX.c parser.c: fix some recursion problems introduced in the last release. * relaxng.c: more debugging of the RNG validation engine, still problems though. Mon Mar 10 14:10:47 CET 2003 Daniel Veillard * Makefile.am: stop generating wrong result file with * in name * relaxng.c: fixing the include bug raised by Sebastian Rahtz * result/relaxng/demo* test/relaxng/demo: added the tests from Sebastian reproducing the problem. Sun Mar 9 18:02:31 MST 2003 John Fleck * doc/xmllint.1: regenerating man page from xmllint.xml to pick up Aleksey's change Sun Mar 9 13:53:16 2003 Aleksey Sanin * xmllint.c doc/xmllint.xml: use $XMLLINT_INDENT environment variable to control the indentation for the xmllint "--format" option Sat Mar 8 14:27:43 CET 2003 Igor Zlatkovic * encoding.c: applied Gennady's patch against buffer overrun Fri Mar 7 19:29:40 CET 2003 Daniel Veillard * test/xsdtest/xsdtest.xml uri.c: after and exchange with James Clark it appeared I had bug in URI parsing code ... * relaxng.c include/libxml/relaxng.h: completely revamped error reporting to not loose message from optional parts. * xmllint.c: added timing for RNG validation steps * result/relaxng/*: updated the result, all error messages changed Fri Mar 7 15:18:32 CET 2003 Daniel Veillard * xpath.c: fix bug #107804, the algorithm used for document order computation was failing on attributes. Thu Mar 6 22:35:50 CET 2003 Daniel Veillard * valid.c: fix bug #107764 , possibility of buffer overflow in xmlValidDebug() Wed Mar 5 17:41:37 CET 2003 Daniel Veillard * nanoftp.c include/libxml/nanoftp.h: adding xmlNanoFTPDele() from Philipp Dunkel Wed Mar 5 10:57:09 CET 2003 Daniel Veillard * xmlschemastype.c: made powten array static it should not be exported * HTMLparser.c: fix bug #107361 by reusing the code from the XML parser function. * testHTML.c: get rid of valgrind messages on the HTML SAX tests Fri Feb 28 00:23:00 CET 2003 Daniel Veillard * tree.c: fixed a node dump crash on attributes * test/xsdtest/xsdtest.xml test/xsdtest/xsdtest.xsl: fixed an URI test bug and get better output. Thu Feb 27 22:28:40 CET 2003 Daniel Veillard * check-xsddata-test-suite.py: give more infos * relaxng.c: fix a bug reported by Sebastian Rahtz and REF->DEF in attribute values. Thu Feb 27 21:09:32 CET 2003 Daniel Veillard * check-xsddata-test-suite.py test/xsdtest/xsdtest.xml test/xsdtest/xsdtest.xsl: import of the XSD Datatype regression tests from James Clark. Thu Feb 27 18:40:04 CET 2003 Daniel Veillard * relaxng.c xmlschemas.c xmlschemastypes.c include/libxml/xmlschemastypes.h: added param support for relaxng type checking, started to increment the pool of simple types registered, still much work to be done on simple types and facets checkings. Wed Feb 26 16:45:39 CET 2003 Daniel Veillard * entities.c: fixes again one of the problem raised by James Clark in #106788 Wed Feb 26 15:46:48 CET 2003 Daniel Veillard * relaxng.c: Fixed a couple of problem raised by James Clark in bug #107083, the support for ID/IDREF/IDREFS at the WXS datatype level still not fixed though. Mon Feb 24 21:09:19 CET 2003 Daniel Veillard * configure.in: preparing release 2.5.4 * doc/*: updated and rebuilt the docs * relaxng.c: removed warnings * result/relaxng/*: updated the results Mon Feb 24 20:53:17 CET 2003 Daniel Veillard * valid.c: fixes a DTD regexp generation problem. Mon Feb 24 20:12:57 CET 2003 Daniel Veillard * parser.c: fixes bug #105998 about false detection of attribute consumption loop. Mon Feb 24 19:14:57 CET 2003 Daniel Veillard * xinclude.c: Fixes bug #106931 in XInclude entities merging. Mon Feb 24 18:50:35 CET 2003 Daniel Veillard * SAX.c: fixed bug #105992 Mon Feb 24 18:14:16 CET 2003 Daniel Veillard * tree.c: fixed xmlSetProp and al. when the node passed is not an element. * relaxng.c: fixed bugs 7.3 (though not complete) and memory leaks found 373 test schemas: 369 success 4 failures found 529 test instances: 525 success 4 failures * check-relaxng-test-suite.py: added memory debug reporting Mon Feb 24 12:41:54 CET 2003 Daniel Veillard * uri.c parser.c: some warning removal on Igor's patch * tree.c: seems I messed up with #106788 fix * python/libxml.c: fixed some base problems when Python provides the resolver. * relaxng.c: fixed the interleave algorithm found 373 test schemas: 364 success 9 failures found 529 test instances: 525 success 4 failures the resulting failures are bug in the algorithm from 7.3 and lack of support for params Sun Feb 23 14:49:39 CET 2003 Daniel Veillard * parser.c: another fix for nodeinfo in entities problem * tree.c entities.c: fixed bug #106788 from James Clark some spaces need to be serialized as character references. Sat Feb 22 18:28:16 CET 2003 Igor Zlatkovic * parser.c uri.c: fixed the bug I introduced in the path handling, reported by Sebastian Bergmann Sat Feb 22 00:19:48 CET 2003 Daniel Veillard * parser.c: fixing some nodeinfo in entities problem raised by Glenn W. Bach * relaxng.c: implemented the first section 7.3 check * result/relaxng/*: updated the results Fri Feb 21 18:12:19 CET 2003 Daniel Veillard * relaxng.c: fixed some problems in the previous commit and finished implementing 4.16 rules checking found 373 test schemas: 353 success 20 failures found 529 test instances: 519 success 6 failures * result/relaxng/*: updated the results Fri Feb 21 16:37:39 CET 2003 Daniel Veillard * relaxng.c: implemented checks from section 7.2 Thu Feb 20 16:00:31 CET 2003 Daniel Veillard * relaxng.c: implemented the checks from section 7.1, fixed some of the 4.20 and 4.21 problems. found 373 test schemas: 338 success 35 failures found 529 test instances: 519 success 6 failures * result/relaxng/*: updated the results Thu Feb 20 01:09:24 CET 2003 Daniel Veillard * relaxng.c: implemented the 4.20 and 4.21 simplification rules. * result/relaxng/*: updated the results Wed Feb 19 18:30:30 CET 2003 Daniel Veillard * relaxng.c: more bugfixes * result/relaxng/*: updated the results Wed Feb 19 15:39:56 CET 2003 Igor Zlatkovic * DOCBparser.c: obsoleted xmlNormalizeWindowsPath * HTMLparser.c: obsoleted xmlNormalizeWindowsPath * SAX.c: ensured xmlDoc.URL is always canonic * parser.c: obsoleted xmlNormalizeWindowsPath * uri.c include/libxml/uri.h: introduced xmlCanonicPath * xmlIO.c include/libxml/xmlIO.h: obsoleted xmlNormalizeWindowsPath * win32/libxml2.def.src: added few exports Wed Feb 19 14:26:51 CET 2003 Daniel Veillard * Makefile.am configure.in: patched to have shared libraries for Python regression tests and static binaries for gdb debug in my development environment * relaxng.c: more bugfixes found 373 test schemas: 296 success 77 failures found 529 test instances: 516 success 8 failures * result/relaxng/*: updated the results Wed Feb 19 01:17:48 CET 2003 Daniel Veillard * relaxng.c: guess what ! Relax-NG bugfixing, what a surprize... Tue Feb 18 22:09:50 CET 2003 Daniel Veillard * xmlschemastypes.c: float/double check bugfix * tree.c include/libxml/tree.h: exported a function for NMTOKEN validation * xmlreader.c: add a TODO for Jody * relaxng.c: bugfix bugfix bugfix found 373 test schemas: 300 success 73 failures found 529 test instances: 507 success 10 failures * result/relaxng/*: updated the results Tue Feb 18 00:33:17 CET 2003 Daniel Veillard * relaxng.c check-relaxng-test-suite.py: more RelaxNG bug hunting Mon Feb 17 18:23:32 CET 2003 Daniel Veillard * relaxng.c check-relaxng-test-suite.py: more work on the RelaxNG implementation conformance testing. found 373 test schemas: 284 success 89 failures found 529 test instances: 448 success 47 failures * result/relaxng/*: updated the results Sun Feb 16 16:48:38 CET 2003 Daniel Veillard * ChangeLog tree.c doc/libxml-doc.el doc/libxml2-api.xml: applied a patch from Kjartan Maraas to fix some typos Sun Feb 16 16:40:52 CET 2003 Daniel Veillard * relaxng.c: more bug-hunting * testRelax.c include/libxml/relaxng.h: added --tree to dump the intermediate rng tree * python/generator.py: patch from Stephane Bidoul to fix the generator on python < 2.2 Fri Feb 14 17:49:26 CET 2003 Daniel Veillard * check-relaxng-test-suite.py relaxng.c: more testing on the Relax-NG front, cleaning up the regression tests failures current state and I forgot support for "mixed": found 373 test schemas: 280 success 93 failures found 529 test instances: 401 success 68 failures * tree.c include/libxml/tree.h xmlschemastypes.c: finished and moved the Name, NCName and QName validation routine in tree.c * uri.c: fixed handling of URI ending up with #, i.e. having an empty fragment ID. * result/relaxng/*: updated the results Thu Feb 13 16:49:24 CET 2003 Daniel Veillard * check-xinclude-test-suite.py: improved the script accordingly to the XInclude regression tests updates * xpointer.c: Implemented XPointer element() Scheme W3C PR of 13 November 2002 * result/XPath/xptr/chapterschildseq result/XPath/xptr/vidchildseq test/XPath/xptr/chapterschildseq test/XPath/xptr/vidchildseq: augmented the Xpointer testsuite for the element() scheme Thu Feb 13 12:00:30 CET 2003 Daniel Veillard * relaxng.c: added TODO for the DTD compatibility spec * xinclude.c: more bug fixes driven by the testsuite Tue Feb 11 19:01:02 CET 2003 Daniel Veillard * check-xinclude-test-suite.py xinclude.c: Work on the W3C/NIST regression tests for XInclude, improved the script, improving XInclude error reporting mechanism Mon Feb 10 17:19:14 CET 2003 Daniel Veillard * NEWS doc/* configure.in: preparing release 2.5.3 Mon Feb 10 17:11:22 CET 2003 Daniel Veillard * tree.c: trying to fix #104934 about some XHTML1 serialization issues. Mon Feb 10 16:41:13 CET 2003 Daniel Veillard * encoding.c xmlIO.c: fixing bug #104646 about iconv based encoding conversion when the input buffer stops in the middle of a multibyte char Mon Feb 10 15:24:47 CET 2003 Daniel Veillard * test/relaxng/OASIS/spectest.xml: OASIS RelaxNG testsuite * check-relaxng-test-suite.py: python script to run regression against OASIS RelaxNG testsuite * relaxng.c: some cleanup tweaks * HTMLparser.c globals.c: cleanups in comments * doc/libxml2-api.xml: updated the API * result/relaxng/*: errors moved files, so large diffs but no changes at the semantic level. Mon Feb 10 01:00:31 CET 2003 Daniel Veillard * tree.c: fixing #105678 problem when dumping a namespace node. Mon Feb 10 00:30:01 CET 2003 Daniel Veillard * xpath.c: fixed doc comment problems * python/generator.py python/libxml_wrap.h python/types.c: adding RelaxNG wrappers * python/tests/Makefile.am python/tests/relaxng.py: added a specific test of those early Python RelaxNG bindings Sun Feb 9 15:18:43 CET 2003 Daniel Veillard * libxml.spec.in: fixes a libtool problem on AMD 64bits builds * relaxng.c: found the validation problem I had with interleave when not covering all remaining siblings * Makefile.am test.relaxng/* result/relaxng/*: augmented the testsuite and check the RNG schemas against the RNG schemas given in appendix A Sat Feb 8 18:55:43 CET 2003 Igor Zlatkovic * win32/Makefile.msvc: updates for RelaxNG * win32/Makefile.mingw: updates for RelaxNG * win32/libxml2.def.src: added RelaxNG exports Fri Feb 7 14:00:53 CET 2003 Daniel Veillard * xinclude.c: applied another bug fix from Sean Chittenden Fri Feb 7 13:34:08 CET 2003 Daniel Veillard * configure.in xmllint.c: I f...ed up the default configuration of schemas and --relaxng option display in xmllint, pointed by Morus Walter. * xlink.c: Sean Chittenden pointed a couple of errors in the XLink detection module, fixes bug #105374. Fri Feb 7 01:43:38 CET 2003 Daniel Veillard * xmlschemastypes.c: added the boolean base type. Thu Feb 6 10:23:52 CET 2003 Daniel Veillard * xmlschemastypes.c: started implementing some of the missing default simple types * result/relaxng/*: updated the results Wed Feb 5 15:28:04 CET 2003 Daniel Veillard * NEWS doc/*: updated the docs, ready for 2.5.2 release Wed Feb 5 14:15:59 CET 2003 Daniel Veillard * HTMLparser.c tree.c xmlIO.c: comments cleanups * Makefile.am: use xmllint for doing the RelaxNG tests * configure.in: preparing 2.5.2 made schemas support default to on instead of off * relaxng.c: removed the verbosity * xmllint.c: added --relaxng option * python/generator.py python/libxml_wrap.h: prepared the integration of the new RelaxNG module and schemas * result/relaxng/*: less verbose output Wed Feb 5 12:00:36 CET 2003 Daniel Veillard * valid.c: do not run content model validation if the content is not determinist Wed Feb 5 11:43:58 CET 2003 Daniel Veillard * SAX.c: added the redefinition of namespaced attribute check that was missing as Fabrice Desr pointed out. Wed Feb 5 11:09:29 CET 2003 Daniel Veillard * HTMLparser.c include/libxml/HTMLparser.h: applied HTML improvements from Nick Kew, allowing to do more checking to HTML elements and attributes. Tue Feb 4 23:47:06 CET 2003 Daniel Veillard * xinclude.c: fixing bug #105137 about entities declaration needing to be copied to the including document. Tue Feb 4 20:26:22 CET 2003 Daniel Veillard * catalog.c: fixed bug #104817 with delegateURI * xpath.c: fixing bugs #104123 and #104125 Tue Feb 4 17:12:56 CET 2003 Daniel Veillard * configure.in valid.c xmlreader.c python/libxml_wrap.h python/types.c: fixing #104096 to compile without regexps Tue Feb 4 16:31:55 CET 2003 Daniel Veillard * valid.c: fixing bug #103969 forgot to add an epsilon transition when building the automata for elem* Tue Feb 4 16:21:07 CET 2003 Daniel Veillard * HTMLparser.c: applied patch from Arne de Bruijn fixing bug #103827 Tue Feb 4 16:17:09 CET 2003 Daniel Veillard * HTMLparser.c: updating a comment, fixing #103776 Tue Feb 4 16:05:53 CET 2003 Daniel Veillard * parser.c: fixing bug 105049 for validity checking of content within recursive entities. Tue Feb 4 15:40:54 CET 2003 Daniel Veillard * HTMLparser.c: try to fix # 105049 * relaxng.c xmlschemastypes.c: a couple of changes and extensions * tree.c: updated a function comment Tue Feb 4 00:20:58 CET 2003 Daniel Veillard * relaxng: more work on grammars and refs/defs * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Mon Feb 3 14:16:59 CET 2003 Daniel Veillard * relaxng: more work on name classes, except support * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Mon Feb 3 11:56:05 CET 2003 Daniel Veillard * relaxng: more work on name classes, the "validate all" schemas seems to work now. * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Mon Feb 3 09:50:26 CET 2003 Daniel Veillard * python/libxml.c: removed an unprotedted debug message Aleksi Suhonen * parser.c: put a guard against infinite document depth, basically trying to avoid another kind of DoS attack. * relaxng.c: some code w.r.t. nameClasses Sun Feb 2 17:01:43 CET 2003 Daniel Veillard * test/relaxng/* result/relaxng/*: check all the namespace support was actually correct based on tutorial section 10. Sun Feb 2 15:33:38 CET 2003 Daniel Veillard * relaxng: include seems to work okay now * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Sat Feb 1 19:44:58 CET 2003 Daniel Veillard * relaxng.c: a bit of work done in the train back. * test/relaxng/*: added one of the include tests Thu Jan 30 14:06:55 CET 2003 Daniel Veillard * relaxng: more work done in the train * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Wed Jan 29 23:44:58 CET 2003 Daniel Veillard * relaxng.c: debugging of externalRef * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Wed Jan 29 22:06:04 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG, implementing externalRef * test/relaxng/* result/relaxng/*: augmented/updated the regression tests * Makefile.am: cleanup to Relaxtests target Wed Jan 29 00:08:38 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG, implementing interleave * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Tue Jan 28 21:56:49 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG, implementing interleave * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Mon Jan 27 07:35:29 MST 2003 John Fleck * doc/tutorial/customfo.xsl * doc/tutorial/customhtml.xsl adding stylesheet customizations used to generate fo for pdf and html Mon Jan 27 13:29:43 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG * test/relaxng/* result/relaxng/*: augmented/updated the regression tests * xmlschemastypes.c: added a number of base type definition but not the associated checks, those are still TODOs Sun Jan 26 17:37:06 MST 2003 John Fleck in docs/tutorial: * apa.html * apb.html * apc.html * apd.html * ape.html * apf.html * apg.html * ar01s02.html * ar01s03.html * ar01s04.html * ar01s05.html * ar01s06.html * ar01s07.html * ar01s08.html * index.html * xmltutorial.pdf * xmltutorial.xml add index to tutorial Sun Jan 26 17:02:29 MST 2003 John Fleck * doc/xmlcatalog.1 * doc/xmlcatalog_man.html * doc/xmlcatalog_man.xml belatedly fixing bug #93622 (adds rewriteURI type to "--add" option in xmlcatalog man page Sun Jan 26 20:47:26 CET 2003 Daniel Veillard * xmlcatalog.c xmllint.c: applied patch for NetBSD by Julio Merino, closing #104475 Sun Jan 26 20:38:43 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Sun Jan 26 01:49:58 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Sat Jan 25 18:59:54 CET 2003 Daniel Veillard * README: updated the policy on private mail answers * relaxng.c: more work on Relax-NG * test/relaxng/* result/relaxng/*: augmented/updated the regression tests Fri Jan 24 15:12:44 CET 2003 Daniel Veillard * error.c parser.c tree.c: applied a documentation patch from Stefan Kost Fri Jan 24 02:00:50 CET 2003 Daniel Veillard * relaxng.c: more work on Relax-NG * doc/*: regenerated the docs * test/relaxng/* result/relaxng/*: updated and augmented the Relax-NG regression tests and results Thu Jan 23 19:26:20 CET 2003 Daniel Veillard * Makefile.am configure.in relaxng.c include/libxml/relaxng.h: First commit of the new Relax-NG validation code, not generally useful yet. * test/relaxng/* result/relaxng/*: current state of the regression tests Thu Jan 23 19:22:54 CET 2003 Daniel Veillard * tree.c: minimized the memory allocated for GetContent and a bit of cleanup. Thu Jan 23 17:41:37 CET 2003 Daniel Veillard * python/generator.py: seems there is no good reasons to not generate bindings for XPointer Tue Jan 21 13:19:35 CET 2003 Daniel Veillard * xmlreader.c doc/apibuild.py: applied a new patch from Stphane Bidoul for cleanups * doc/libxml2-api.xml: rebuilt the API description with new entry points Mon Jan 20 23:25:00 CET 2003 Daniel Veillard * xmlreader.c python/drv_libxml2.py python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: patch from Stphane Bidoul for better per context error message APIs * python/tests/ctxterror.py python/tests/readererr.py: update of the tests Sun Jan 19 17:09:28 MST 2003 John Fleck * doc/guidelines.html grammar and spelling cleanup Fri Jan 17 00:31:30 CET 2003 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h python/generator.py python/libxml.c python/libxml.py win32/libxml2.def.src: applied a patch from Stphane Bidoul to allow per XMLtextReader error and warning handling * python/tests/Makefile.am python/tests/readererr.py: adding the specific regression test Tue Jan 14 17:00:08 CET 2003 Daniel Veillard * xpath.c: Alexey Efimov pointed out that concat('a', 'b', ) should raise a syntax error Tue Jan 14 15:39:14 CET 2003 Daniel Veillard * python/libxml.c: cleanup patch from Stphane Bidoul Tue Jan 14 14:41:18 CET 2003 Daniel Veillard * encoding.c: fixing bug #103100 with a dummy UTF8ToUTF8 copy Tue Jan 14 12:40:29 CET 2003 Daniel Veillard * python/generator.py python/libxml.c python/libxml.py python/libxml_wrap.h python/types.c: applied and fixed a patch from Stphane Bidoul to provide per parser error handlers at the Python level. * python/tests/Makefile.am python/tests/ctxterror.py: added a regression test for it. Tue Jan 14 01:15:04 CET 2003 Daniel Veillard * xmlreader.c: fixed the streaming property of the reader, it was generating tree faster than consuming it. Pointed out by Nate Myers * tree.c: fixed a bug in xmlSaveFormatFileEnc if passed a NULL doc Sun Jan 12 22:18:02 CET 2003 Igor Zlatkovic * win32/libxml2.def.src: added more xmlreader and other exports Fri Jan 10 18:04:32 CET 2003 Daniel Veillard * xpath.c: fix to the XPath implementation for parent and ancestors axis when operating on a Result Value Tree. Fixes bug #100271 Fri Jan 10 17:07:01 CET 2003 Daniel Veillard * nanoftp.c nanohttp.c xmlIO.c: patch from Stefano Zacchiroli to fix some URI/file escaping problems Fri Jan 10 16:20:34 CET 2003 Daniel Veillard * python/generator.py: fixed a bug raised by Raymond Wiker, docSetRootElement() should not raise an exception if the return is None Fri Jan 10 14:13:03 CET 2003 Daniel Veillard * python/libxml.py python/libxml.c python/libxml2-python-api.xml: fixed bug #102181 by applying the suggested change and fixing the generation/registration problem. Fri Jan 10 13:47:55 CET 2003 Daniel Veillard * HTMLparser.c: fixed bug #102960 by reusing the XML name parsing routines. Fri Jan 10 00:16:49 CET 2003 Daniel Veillard * parser.c: one more IsEmptyElement crazyness, that time in external parsed entities if substitution is asked. * python/tests/reader3.py: added a specific test. Thu Jan 9 22:35:31 CET 2003 Daniel Veillard * python/drv_libxml2.py: update from Stphane Bidoul: python 2.1 support and improved error handler registration Thu Jan 9 14:16:38 CET 2003 Daniel Veillard * HTMLtree.c tree.c: fixes #102920 about namespace handling in HTML output and section 16.2 "HTML Output Method" of XSLT-1.0 * README: fixed a link Wed Jan 8 18:32:25 CET 2003 Daniel Veillard * configure.in doc/* NEWS: preparing 2.5.1 release * SAX.c parser.c: fixing XmlTextReader bug Wed Jan 8 00:13:01 CET 2003 Daniel Veillard * SAX.c: fuck, I introduced a memory leak on external parsed entities in 2.5.0 :-( Tue Jan 7 12:12:45 CET 2003 Daniel Veillard * xmllint.c: another fix needed as pointed by Christophe Merlet for --stream --debug if compiled without debug support. Mon Jan 6 20:53:08 MST 2003 John Fleck * doc/xmllint.xml * doc/xmllint.1: update man page with --stream and --chkregister Tue Jan 7 01:17:26 CET 2003 Daniel Veillard * globals.c: fixed --with-threads compile * xmllint.c: fixed --without-debug compile * include/libxml/globals.h: cleanup * include/libxml/schemasInternals.h: add a missing include Mon Jan 6 14:06:07 CET 2003 Daniel Veillard * configure.in NEWS: preparing 2.5.0 release * SAX.c: only warn in pedantic mode about namespace name brokeness * globals.c: fix a doc generation problem * uri.c: fix #101520 * doc/*: updated and rebuilt the doc for the release, includuding stylesheet update * python/Makefile.am: fix a filename bug Mon Jan 6 12:05:12 CET 2003 Daniel Veillard * doc/tutorial/* : fixed #101894 if doc == NULL xmlFreeDoc should not be called. Mon Jan 6 11:59:09 CET 2003 Daniel Veillard * libxml-2.0.pc.in: applied the patch to fix #101894 Sun Jan 5 23:35:47 CET 2003 Daniel Veillard * tree.c : applied patch from Lukas Schroeder for register callbacks * valid.c: modified patch from Lukas Schroeder to test register callbacks with --chkregister Sun Jan 5 02:23:20 CET 2003 Daniel Veillard * xmlreader.c: seriously changed the way data are pushed to the underlying parser, go by block of 512 bytes instead of tryng to detect tag boundaries at that level. Changed the way empty element are detected and tagged. * python/tests/reader.py python/tests/reader2.py python/tests/reader3.py: small changes mostly due to context reporting being different and DTD node being reported. Some errors previously undetected are now caught and fixed. * doc/xmlreader.html: flagged last section as TODO Sat Jan 4 20:40:28 CET 2003 Daniel Veillard * python/libxml.py: integrated the Python 2.2 optimizations from Hannu Krosing, while maintaining compatibility with 1.5 and 2.1 Sat Jan 4 17:33:17 CET 2003 Daniel Veillard * xmllint.c: a bit of cleanup * xmlreader.c: small fix * doc/xmlreader.html: more work on the XmlTextReader tutorial * python/libxml.py: a few fixes pointed out by Hannu Krosing Sat Jan 4 13:46:14 CET 2003 Daniel Veillard * python/setup.py.in: patch from Stphane Bidoul to include drv_libxml2.py in setup.py Sat Jan 4 01:43:06 CET 2003 Daniel Veillard * doc/xmlreader.html: starting documenting the new XmlTextReader interface. Fri Jan 3 17:18:32 CET 2003 Daniel Veillard * xmllint.c: added the --stream flag to use the TextReader API * xmlreader.c: small performance tweak Fri Jan 3 13:50:55 CET 2003 Daniel Veillard * xmlreader.c python/tests/reader2py: okay the DTD validation code on top of the XMLTextParser API should be solid now. Fri Jan 3 02:17:18 CET 2003 Daniel Veillard * xmlreader.c python/tests/reader2py: Fixing some more mess with validation and recursive entities while using the reader interface, it's getting a bit messy... Thu Jan 2 15:15:26 CET 2003 Daniel Veillard * xmlreader.c python/tests/reader.py: another couple of problem related to IsEmptyElement reported by Stphane Bidoul needed some fixes. Thu Jan 2 13:57:07 CET 2003 Daniel Veillard * libxml.spec.in python/Makefile.am python/drv_libxml2.py: integrated drv_libxml2.py Python xml.sax driver from Stphane Bidoul based on the python XmlTextReader interface. Wed Jan 1 22:05:40 CET 2003 Daniel Veillard * tree.c: backing out one change in the last patch which broke the regression tests Wed Jan 1 21:57:28 CET 2003 Daniel Veillard * global.data globals.c tree.c include/libxml/globals.h: applied an old patch from Lukas Schroeder to track node creation and destruction. Probably missing a lot of references at the moment and not usable reliably. Wed Jan 1 20:12:07 CET 2003 Daniel Veillard * NEWS doc/Makefile.am doc/news.xsl: generate the NEWS file from doc/news.html and a stylesheet Wed Jan 1 16:09:57 CET 2003 Daniel Veillard * xmlreader.c python/tests/reader.py: fixed another couple of xmlreader bugs reported by Stphane Bidoul and added tests. Wed Jan 1 15:42:54 CET 2003 Daniel Veillard * xmlreader.c python/tests/reader2.py: fixed another validity checking in external parsed entities raised by Stphane Bidoul and added a specific regression test. * python/tests/reader3.py: cleanup Tue Dec 31 15:44:02 CET 2002 Daniel Veillard * xmlreader.c python/tests/reader2.py: fixed a problem with validation within entities pointed by Stphane Bidoul, augmented the tests to catch those. Tue Dec 31 12:15:37 CET 2002 Daniel Veillard * python/generator.py: modified the generator to allow keeping class references when creating new classes, needed to fix a bug pointed by Stphane Bidoul where the input buffer of the xmlTextReader instance gets destroyed if the python wrapper for the input is not referenced anymore. Mon Dec 30 19:39:36 CET 2002 Daniel Veillard * xmlreader.c python/tests/reader.py: fixed another pair of problem pointed by Stphane Bidoul: depth start at 0 and a parse problem. Mon Dec 30 13:36:50 CET 2002 Daniel Veillard * xmlreader.c python/tests/reader.py: fixed another problem pointed by Stphane Bidoul Mon Dec 30 12:39:55 CET 2002 Daniel Veillard * xmlreader.c python/tests/reader.py: fixed a limit case problem with "" Mon Dec 30 11:53:44 CET 2002 Daniel Veillard * SAX.c: warn on xmlns:prefix="foo" * xmlreader.c python/tests/reader.py: fixed a couple of problem for namespace attributes handling. Mon Dec 30 00:59:07 CET 2002 Daniel Veillard * entities.c parser.c tree.c include/libxml/entities.h: Fixed a really nasty problem raised by a DocBook XSLT transform provided by Sebastian Bergmann Sun Dec 29 12:13:18 CET 2002 Daniel Veillard * xmlreader.c python/tests/reader.py: fixed a bug pointed out by Stphane Bidoul and integrated it into the tests Sat Dec 28 23:49:12 CET 2002 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: extended the XmlTextReader API a bit, addding accessors for the current doc and node, and an entity substitution mode for the parser. * python/libxml.py python/libxml2class.txt: related updates * python/tests/Makefile.am python/tests/reader.py python/tests/reader2.py python/tests/reader3.py: updated a bit the old tests and added a new one to test the entities handling Sat Dec 28 22:11:57 CET 2002 Daniel Veillard * python/generator.py python/libxml2class.txt python/tests/reader.py python/tests/reader2.py: changed the generator to provide casing for the XmlTextReader similar to C# so that examples and documentation are more directly transposable. Fixed the couple of tests in the suite. Sat Dec 28 15:55:32 CET 2002 Daniel Veillard * doc/guidelines.html: added a document on guildeline for publishing and deploying XML Fri Dec 27 20:35:15 CET 2002 Daniel Veillard * valid.c xmlreader.c: final touch running DTD validation on the XmlTextReader * python/tests/Makefile.am python/tests/reader2.py: added a specific run based on the examples from test/valid/*.xml Fri Dec 27 15:17:20 CET 2002 Daniel Veillard * python/libxml.py: added a few predefined xmlTextReader parser configuration values. Fri Dec 27 12:57:22 CET 2002 Daniel Veillard * python/libxml_wrap.h: trying to fix #102037 Fri Dec 27 12:18:14 CET 2002 Daniel Veillard * SAX.c: fixing bug #95296, when the predefined entities are redefined in the DTD the Ŝ_~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'=`Xdefault one must be used instead anyway. Wed Dec 25 19:22:06 MST 2002 John Fleck * doc/xmllint.xml * doc/xmllint.1 Add discussion of XML_DEBUG_CATALOG to xmllint man page - bug #100907 Mon Dec 23 16:54:22 CET 2002 Daniel Veillard * xmlreader.c: Fixed the empty node detection to avoid reporting an inexistant close tag. Mon Dec 23 15:42:24 CET 2002 Daniel Veillard * python/libxml.c python/setup.py.in: patch from Stphane Bidoul for Python 2.1 Sun Dec 22 11:24:06 CET 2002 Daniel Veillard * testC14N.c vms/config.vms: applied Craig A. Berry patches for VMS Fri Dec 20 11:27:49 CET 2002 Daniel Veillard * doc/libxml2-api.xml python/tests/reader.py: one really need to provide the base URI information when creating a reader parser from an input stream. Updated the API and the example using it. Fri Dec 20 01:11:30 CET 2002 Daniel Veillard * testReader.c xmlreader.c valid.c include/libxml/tree.h include/libxml/valid.h include/libxml/xmlreader.h: working on DTD validation on top of xml reader interfaces. Allows to validate arbitrary large instances. This required some extensions to the valid module interface and augmenting the size of xmlID and xmlRef structs a bit. * uri.c xmlregexp.c: simple cleanup. Wed Dec 18 15:51:22 CET 2002 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: more work on the xml reader interfaces. * AUTHORS MAINTAINERS doc/* win32/*: updated Igor's mail and the Web page for the Windows binaries. Tue Dec 17 19:31:07 CET 2002 Daniel Veillard * xmlIO.c: applied a patch for VMS following the report by Nigel Hall Tue Dec 17 11:29:41 CET 2002 Daniel Veillard * parser.c: the parseStartTag bug fix wasn't complete. Mon Dec 16 23:00:05 CET 2002 Daniel Veillard * parser.c: Vyacheslav Pindyura managed to trigger a bug in parseStartTag, fixing it. * test/att4 result/att4 result/noent/att4: adding the test * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added more methods to XmlTextReader. Mon Dec 16 19:31:16 CET 2002 Igor Zlatkovic * win32/libxml2.def.src: added more xml reader exports * win32/Makefile.msvc win32/Makefile.mingw: added xml reader interface to the build Mon Dec 16 06:36:54 MST 2002 John Fleck * doc/tutorial/xmltutorial.xml plus generated html and pdf Updating tutorial again based on further comments from Niraj Tolia on the last iteration Sun Dec 15 21:27:30 MST 2002 John Fleck * doc/tutorial/xmltutorial.xml * doc/tutorial/includekeyword.c * doc/tutorial/includegetattribute.c plus generated html and pdf Adding fix from Niraj Tolia to tutorial to properly free memory. Mon Dec 16 00:34:25 CET 2002 Daniel Veillard * xmlreader.c include/libxml/xmlreader.h doc/libxml2-api.xml: added more methods of XmlTextReader. * python/libxml2class.txt python/tests/reader.py: this increased the methods in the bndings, augmented the test to check those new functions. Sat Dec 14 23:57:39 CET 2002 Daniel Veillard * xmlreader.c doc/libxml2-api.xml: added the close and getattribute methods of XmlTextReader. * python/generator.py python/libxml_wrap.h python/types.c python/libxml2class.txt: added the reader to the Python bindings * python/tests/Makefile.am python/tests/reader.py: added a specific test for the Python bindings of the Reader APIs * parser.c: small cleanup. Fri Dec 13 11:39:44 CET 2002 Daniel Veillard * xinclude.c: fallback was only copying the first child not the full child list of the fallback element, closes #89684 as reopened by Bernd Kuemmerlen Thu Dec 12 13:34:59 CET 2002 Igor Zlatkovic * win32/libxml2.def.src: exported htmlNodeDumpOutput Thu Dec 12 10:59:11 CET 2002 Daniel Veillard * configure.in: preparing release of 2.4.30 * doc/apibuild.py doc/libxml2-api.xml: fixups to the api builder, gives enum values, fix functype return type, put back fields in structs * doc/*: updated the docs rebuilt Thu Dec 12 01:09:34 CET 2002 Daniel Veillard * HTMLtree.c include/libxml/HTMLtree.h: patch from Mark Vakoc about htmlNodeDumpOutput location. * xpath.c: removed an undefined function signature * doc/apibuild.py doc/libxml2-api.xml: the script was exporting too many symbols in the API breaking the python bindings. Updated with the libxslt/libexslt changes. Wed Dec 11 20:26:15 CET 2002 Daniel Veillard * configure.in: preparing release of 2.4.29 * doc/*: rebuilt the docs and API * xmlreader.c: a few more fixes for the XmlTextReader API Wed Dec 11 18:01:15 CET 2002 Igor Zlatkovic * include/win32config.h: applied mingw patch from Magnus Henoch Wed Dec 11 16:58:48 CET 2002 Daniel Veillard * catalog.c doc/libxml2-api.xml: a bit more cleanup Wed Dec 11 14:54:47 CET 2002 Daniel Veillard * doc/apibuild.py doc/libxml2-api.xml doc/Makefile.am: new API building Python script, does the C parsing directly, generates a better API description including structure fieds defs and enums. Still a couple of bugs, but good enough for the python wrappers now. * DOCBparser.c SAX.c nanohttp.c parser.c parserInternals.c tree.c valid.c xmlIO.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c include/libxml/schemasInternals.h include/libxml/tree.h: more cleanup based on the python analysis script reports. * libxml.spec.in: make sure the API XML description is part of the devel package. Tue Dec 10 16:16:34 CET 2002 Daniel Veillard * DOCBparser.c HTMLparser.c c14n.c debugXML.c encoding.c hash.c nanoftp.c nanohttp.c parser.c parserInternals.c testC14N.c testDocbook.c threads.c tree.c valid.c xmlIO.c xmllint.c xmlmemory.c xmlreader.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c: code cleanup, especially the function comments. * tree.c: fixed a small bug when freeing nodes which are XInclude ones. Mon Dec 9 15:08:17 CET 2002 Daniel Veillard * Makefile.am xmlreader.c include/libxml/Makefile.am include/libxml/xmlreader.h: Adding a new set of APIs based on the C# TextXmlReader API but converted to C. Allow to parse in constant memory usage, far simpler to program and explain than the SAX like APIs, unfinished but working. * testReader.c: test program Sun Dec 8 18:36:01 CET 2002 Igor Zlatkovic * win32/libxml2.def.src: applied YALDSP from Mark Vakoc Wed Dec 4 16:08:49 CET 2002 Daniel Veillard * tree.c: Chip turner indicated that XHTML1 serialization rule for style actually break on both IE and Mozilla, try to avoid the rule if escaping ain't necessary Wed Dec 4 12:43:28 CET 2002 Daniel Veillard * nanhttp.c: handle HTTP URL escaping, problem reported by Glen Nakamura and Stefano Zacchiroli Sat Nov 30 12:19:17 CET 2002 Daniel Veillard * DOCBparser.c HTMLparser.c parser.c valid.c xpath.c: code cleanup Thu Nov 28 12:53:22 CET 2002 Daniel Veillard * uri.c: Johann Richard pointed out some XPointer problems for URN based URI references in XInclude. Modified the URI parsing and saving routines to allow correct parsing and saving of XPointers, especially when attached to "opaque" scheme accordingly to RFC 2396 Wed Nov 27 20:36:08 CET 2002 Daniel Veillard * HTMLtree.c include/libxml/HTMLtree.h: applied the same kind of refactoring to the HTML saving code. * doc/libxml2-*.xml doc/API*.html: slight API changes got reflected in the doc. Wed Nov 27 12:40:16 CET 2002 Daniel Veillard * tree.c include/libxml/tree.h: refactored the XML dump of a node to a buffer API to reuse the generic dump to an OutputIO layer, this reduces code, fixes xmlNodeDump() for XHTML, also made xmlNodeDump() now return the number of byte written. Wed Nov 27 09:00:00 CET 2002 Daniel Veillard * python/setup.py.in: another patch from Stphane Bidoul for Python bindings on Windows * doc/parsedecl.py: small cleanup Mon Nov 25 17:28:53 CET 2002 Daniel Veillard * libxml.spec.in configure.in: add a line in %changelog for releases Mon Nov 25 14:18:27 CET 2002 Daniel Veillard * parser.c: patch from Marcus Clarke fixing a problem in entities parsing that was detected in KDe documentations environment. Mon Nov 24 14:13:21 CET 2002 ERDI Gergo * python/libxml.c (libxml_prev): Return the previous as opposed to the next node (I guess this is the result of some cut & paste programming:) Sat Nov 23 17:22:22 CET 2002 Daniel Veillard * doc/Makefile.am: Jan Rafaj pointed a bug in the Makefile. Sat Nov 23 12:21:24 CET 2002 Daniel Veillard * python/generator.py python/libxml.c python/setup.py.in: trying to fix the Python bindings build on Windows (Stphane Bidoul) Fri Nov 22 22:41:34 CEST 2002 Igor Zlatkovic * win32/configure.js: added option for python bindings * win32/libxml2.def.src: added more exports Fri Nov 22 18:50:34 CET 2002 Igor Zlatkovic * win32/Makefile.mingw: fixed unresolved symbols when linking with pthreads * win32/wince/*: applied updates to Windows CE port from Javier Fri Nov 22 15:51:22 CET 2002 Daniel Veillard * configure.in: preparing 2.4.28 * libxml.spec.in doc/Makefile.am: some cleanup * doc/*: updated the news and regenerated. Fri Nov 22 14:15:14 CET 2002 Daniel Veillard * HTMLparser.c: final touch at closing #87235

end tags need to be generated. * result/HTML/cf_128.html result/HTML/test2.html result/HTML/test3.html: this change slightly the output of a few tests * doc/*: regenerated Fri Nov 22 13:26:19 CET 2002 Daniel Veillard * parserInternals.c: fixing bug #99190 when UTF8 document are parsed using the progressive parser and the end of the chunk is in the middle of an UTF8 multibyte character. Fri Nov 22 13:13:00 HKT 2002 William Brack * threads.c: fixed initialization problem in xmlNewGlobalState which was causing crash. * globals.c: removed duplicate call to initxmlDefaultSAXHandler in xmlInitializeGlobalState. * parserInternals.c: cleaned up ctxt->sax initialisation. Thu Nov 21 15:05:45 CET 2002 Daniel Veillard * tree.c include/libxml/tree.h: modified the existing APIs to handle XHTML1 serialization rules automatically, also add xmlIsXHTML() to libxml2 API. Some tweaking to make sure libxslt serialization uses it when needed without changing the library API. * test/xhtml1 result/noent/xhtml1 result/valid/xhtml1.xhtml result/xhtml1: added a new test specifically for xhtml1 output and updated the result of one XHTML1 test Wed Nov 20 14:24:56 CET 2002 Daniel Veillard * xinclude.c parserInternals.c encoding.c: fixed #99082 for xi:include encoding="..." support on text includes. * result/XInclude/tstencoding.xml test/XInclude/docs/tstencoding.xml test/XInclude/ents/isolatin.txt : added a specific regression test * python/generator.py python/libxml2class.txt: fixed the generator the new set of comments generated for doc/libxml2-api.xml were breaking the python generation. Tue Nov 19 23:25:47 CET 2002 Daniel Veillard * doc/Makefile.am: repair some problem if gtk-doc fail or such * configure.in: patch for Solaris on new autoconf closes #98880 * doc/parsedecl.py: repair the frigging API building script, did I say that python xmllib sucks ? * doc/libxml2-api.xml doc/libxml2-refs.xml: regenerated, reordering and some comment are no more truncated. Tue Nov 19 09:09:04 CET 2002 Daniel Veillard * parser.c: Martin Stoilov pointed out a potential leak in xmlCreateMemoryParserCtxt Mon Nov 18 16:05:51 CET 2002 Daniel Veillard * HTMLparser.c: fixed bug #98879 a corner case when 0 is included in HTML documents and using the push parser. Mon Nov 18 00:11:24 CET 2002 ERDI Gergo * configure.in (PYTHON_SITE_PACKAGES): If --with-python is specified, look for the Python interpreter not just in the specified root but also in the specified location. Fixes #98825 Sun Nov 17 23:36:06 CET 2002 Daniel Veillard * python/libxml.c: fixing bug #98792 , node may have no doc and dereferencing without checking ain't good ... Sun Nov 17 10:25:43 CET 2002 Daniel Veillard * configure.in: preparing release 2.4.27 * doc/* : updated and rebuilt the docs * doc/Makefile.am libxml.spec.in: try to make sure the tutorial and all the docs are actually packaged and in the final RPMs * parser.c parserInternals.c include/libxml/parser.h: restore xmllint --recover feature. Sat Nov 16 16:30:25 CET 2002 Daniel Veillard * parser.c xpath.c: fixing #96925 wich was also dependent on the processing of parsed entities, and XPath computation on sustitued entities. * testXPath.c: make sure entities are substitued. Fri Nov 15 16:22:54 CET 2002 Daniel Veillard * parser.c: fixed #96594, which was totally dependent on the processing of internal parsed entities, which had to be changed. Fri Nov 15 12:16:07 CET 2002 Daniel Veillard * Makefile.am python/Makefile.am python/tests/Makefile.am: trying to fix bug #98517 about building outside the source tree * doc/xml.html doc/FAQ.html: fixed the link to libiconv #94585 Thu Nov 14 18:41:55 CEST 2002 Igor Zlatkovic * include/win32config.h: cleanup * win32/Makefile.mingw: integrated mingw in JScript configure * win32/Makefile.msvc: modified to allow mingw coexistence * win32/configure.js: integrated mingw * win32/Readme.txt: cleanup Tue Nov 12 22:06:45 CET 2002 Daniel Veillard * HTMLparser.c: strengthen the guard in the Pop macros, like in the XML parser, closes bug #97315 Tue Nov 12 21:56:39 CET 2002 Daniel Veillard * include/libxml/parser.h: fixed bug #98338 , fatalError SAX callback is never used. Tue Nov 12 13:32:50 CET 2002 Daniel Veillard * parserInternals.c: fixed the initialization of the SAX structure which was breaking xsltproc * xpath.c: patch from Petr Pajas for CDATA nodes * tree.c: patch from Petr Pajas improving xmlGetNodePath() * parser.c include/libxml/parser.h: patch from Peter Jones removing a leak in xmlSAXParseMemory() and adding the function xmlSAXParseMemoryWithData() Mon Nov 11 20:47:03 MST 2002 John Fleck adding pdf of tutorial, changing web page to link to it * doc/tutorial/xmltutorial.pdf * doc/xml.html * doc/docs.html Sun Nov 10 20:48:57 MST 2002 John Fleck * doc/tutorial/ar01s08.html adding file what I forgot for tutorial Sun Nov 10 20:33:13 MST 2002 John Fleck Adding encoding discussion to tutorial Added: * doc/tutorial/images/*.png: DocBook admonition image files * doc/tutorial/apf.html, apg.html: new generated html * doc/tutorial/includeconvert.c: conversion code entity file changed: * doc/tutorial/xmltutorial.xml: DocBook original * doc/tutorial/*.html: generated html Fri Nov 8 17:59:32 CEST 2002 Igor Zlatkovic * include/libxml/*.h: retired xmlwin32version.h * doc/Makefile.am: retired xmlwin32version.h * win32/configure.js: retired xmlwin32version.h Fri Nov 8 16:55:47 CEST 2002 Igor Zlatkovic * win32/libxml2.def.src: exported additional symbols * include/libxml/xmlmemory.h: exported the rest of the xmlMem* sisterhood Fri Nov 8 16:08:13 CET 2002 Daniel Veillard * globals.c: fixed a typo pointed out by Igor * xpath.c: try to speed up node compare using line numbers if available. Thu Nov 7 15:16:02 CET 2002 Daniel Veillard * tree.c: make xmlFreeNode() handle attributes correctly. Wed Nov 6 23:51:11 CET 2002 Igor Zlatkovic * catalog.c: completed the #96963 fix, as reported by Karl Eichwalder Wed Nov 6 16:48:44 CET 2002 Daniel Veillard * xpointer.c: tried to fix bug #97852 reported by Nicolas Noffke Sun Nov 3 10:43:44 CET 2002 Daniel Veillard * Makefile.am: switched the order of a couple of includes to fix bugs #97100 Thu Oct 31 17:11:46 CEST 2002 Igor Zlatkovic * catalog.c: fixed bug #96963, reverted to the old behaviour of xmlLoadCatalogs that used to separate directories with a ':'. Thu Oct 31 16:55:21 CEST 2002 Igor Zlatkovic * threads.c: improvements to the Windows-side of thread handling * testThreads.c: conditionally excluded unistd.h * testThradsWin32.c: broke overlong lines * include/win32config.h: adapted thread-related macros to the new scheme and for pthreads on Windows * win32/Makefile.msvc: introduced a more flexible thread build, added testThreads[Win32].c to the build * win32/configure.js: introduced a more flexible thread config 2002-10-31 John Fleck * doc/xml.html (and, by implication, FAQ.html) added UTF-8 conversaion FAQ from Marcus Labib Iskander Tue Oct 29 18:32:33 CET 2002 Igor Zlatkovic * configure.in: removed xmlwin32version.h * include/libxml/Makefile.am: removed xmlwin32version.h Mon Oct 28 14:01:29 CET 2002 Daniel Veillard * tree.c: applied patch from Brian Stafford to fix a bug in xmlReconciliateNs() Mon Oct 28 13:51:55 CET 2002 Daniel Veillard * tree.c: applied patch from Christian Glahn to allow xmlNewChild() on document fragment nodes Sat Oct 26 15:27:00 CEST 2002 Daniel Veillard * parser.c: Christian Glahn found a problem with a recent patch to xmlParseBalancedChunkMemoryRecover() * xmlschemas.c: Charles Bozeman fixed some Schemas validation problems * result/schemas/elem* result/schemas/seq* test/schemas.elem* test/schemas/seq*: added the test cases from Charles Wed Oct 23 16:42:29 CEST 2002 Daniel Veillard * Makefile.am config.h.in libxml.spec.in doc/Makefile.am: serious cleanup of the spec file and associated changes in the Makefiles. * valid.c: try to remove some warnings on x86_64 Wed Oct 23 10:53:42 CEST 2002 Daniel Veillard * include/Makefile.am: added winsockcompat.h to EXTRA_DIST to fix bug #96586 Tue Oct 22 21:13:06 CEST 2002 Daniel Veillard * HTMLparser.c: Mikhail Sogrine pointed out a bug in HTML parsing, applied his patch * result/HTML/attrents.html result/HTML/attrents.html.err result/HTML/attrents.html.sax test/HTML/attrents.html: added the test and result case provided by Mikhail Sogrine Tue Oct 22 19:33:20 CEST 2002 Daniel Veillard * vms/build_libxml.com vms/config.vms vms/readme.vms include/libxml/parser.h include/libxml/parserInternals.h include/libxml/tree.h include/libxml/xmlIO.h HTMLparser.c catalog.c debugXML.c parser.c parserInternals.c tree.c triodef.h trionan.c uri.c xmlIO.c xpath.c: Applied the VMS update patch from Craig A. Berry * doc/*.html: update Tue Oct 22 16:27:31 CEST 2002 Daniel Veillard * include/libxml/encoding.h encoding.c: made xmlGetUTF8Char public Tue Oct 22 16:25:18 CEST 2002 Daniel Veillard * debugXML.c: adding a grep command to --shell in xmllint for T.V. Raman Tue Oct 22 16:23:57 CEST 2002 Daniel Veillard * xmlcatalog.c: tried to fix some of the problem with --sgml Mon Oct 21 09:57:10 CEST 2002 Daniel Veillard * parser.c: tried to fix bug #91500 where doc->children may be overriden by a call to xmlParseBalancedChunkMemory() Mon Oct 21 09:04:32 CEST 2002 Daniel Veillard * catalog.c: tried to fix bug #90945 w.r.t. parsing of system identifiers in SGML catalogs containing '&' Sun Oct 20 23:31:47 CEST 2002 Daniel Veillard * python/types.c: fixed bugs when passing result value tree to Python functions. Fri Oct 18 13:18:53 CEST 2002 Daniel Veillard * configure.in: preparing the release of 2.4.26 * doc/*: updated and rebuilt the documentation Wed Oct 16 20:01:46 CEST 2002 Daniel Veillard * parser.c: fixed a XML Namespace compliance bug reported by Alexander Grimalovsky Wed Oct 16 17:18:42 CEST 2002 Daniel Veillard * HTMLtree.c: fixed serialization of script and style when they are not lowercase (i.e. added using the API to the tree). Wed Oct 16 16:31:05 CEST 2002 Daniel Veillard * valid.c: make xmlValidateDocument emit a warning msg if there is no DTD, pointed by Christian Glahn Wed Oct 16 16:05:38 CEST 2002 Daniel Veillard * xmlregexp.c xmlschemas.c: fixed the validation of sequences content model when some of the blocks have min or max, and a couple of bugs found in the process. * result/schemas/list0* test/schemas/list0*: added some specific regression tests Tue Oct 15 12:41:01 CEST 2002 Daniel Veillard * README: updated the contact informations Tue Oct 15 10:35:57 CEST 2002 Daniel Veillard * Makefile.am: use test -f instead of test -e since Solaris /bin/sh misses it, reported by Peter Bray. Mon Oct 14 17:37:32 CEST 2002 Daniel Veillard * tree.c: investigating xmlNodeGetContent() on namespace nodes and removed a few warnings Mon Oct 14 13:12:55 CEST 2002 Dani$el Veillard * parser.c: Christian Glahn found a small bug in the push parser. * xmlIO.c include/libxml/xmlIO.h: cleaned up and made xmlCheckFilename public Wed Oct 9 23:11:02 CEST 2002 Daniel Veillard * xmlschemas.c include/libxml/xmlschemas.h: added xmlSchemaNewMemParserCtxt to parse a schemas from a memory area * testSchemas.c: added --memory to test the new interface Wed Oct 9 16:22:54 CEST 2002 Daniel Veillard * doc/index.py doc/search.php: integrated the XSLT indexing, a few fixed in the indexer, added a scope selection at the search level. Wed Oct 9 12:18:37 CEST 2002 Daniel Veillard * valid.c: Joe Marcus Clarke reported a segfault on FBsd this was due to uninitialized parts of the validation context Tue Oct 8 23:24:20 CEST 2002 Daniel Veillard * debugXML.c: applied patch from Mark Vakoc except the API change, preserved it. * doc/*: updated the docs to point to the search engine for information lookup or before bug/help reports. Tue Oct 8 18:53:31 CEST 2002 Daniel Veillard * doc/index.py doc/search.php: added mailing-list archives indexing and lookup Tue Oct 8 10:25:07 CEST 2002 Daniel Veillard * tree.c: patch from Mark Vakoc to fix xmlNodeGetPath() Mon Oct 7 13:12:03 CEST 2002 Daniel Veillard * doc/index.py: improved HTML indexing * doc/search.php: make the queries also lookup the HTML based indexes Sun Oct 6 23:50:29 CEST 2002 Daniel Veillard * doc/index.py: added HTML page indexing Fri Oct 4 15:33:55 CEST 2002 Igor Zlatkovic * xmlIO.c: extended Windows path normalisation to fix the base problem in libxslt. * catalog.c: fixed list handling in XML_CATALOG_FILES Fri Oct 4 13:43:02 CEST 2002 Daniel Veillard * valid.c: typo/bug found by Christian Glahn Sun Sep 29 19:44:10 CEST 2002 Igor Zlatkovic * xmlIO.c: applied Windows CE patch from Javier. * win32/wince: new directory, contains support for the PocketPC with Windows CE from Javier. * include/win32config.h: reorganised, removed duplicate definitions and applied WinCE patch from Javier. * include/wsockcompat.h: new file, now contains WinSock compatibility macros. * win32/Makefile.msvc: introduced double-run compilation. Thu Sep 26 19:48:06 CEST 2002 Daniel Veillard * configure.in include/libxml/xmlwin32version.h: preparing release of 2.4.25 * doc/*: updated and regenerated teh docs and web pages. Thu Sep 26 17:33:46 CEST 2002 Daniel Veillard * SAX.c valid.c include/libxml/valid.h: fixed bug #92518 validation error were not covering namespace declarations. * result/valid/dia.xml test/valid/dia.xml: the test wasn't valid, it was missing the attribute declaration for the namespace * result/VC/NS3: the fix now report breakages in that test Thu Sep 26 14:39:07 CEST 2002 Daniel Veillard * HTMLtree.c: fixing bug #94241 on HTML boolean attributes Thu Sep 26 14:25:33 CEST 2002 Daniel Veillard * doc/*: added the 3 new modules xmlregexp xmlautomata and xmlunicode and regenerated the docs and web site Thu Sep 26 11:45:42 CEST 2002 Daniel Veillard * xinclude.c xmlschemas.c xmlschemastypes.c xpath.c: make sure ATTRIBUTE_UNUSED is always put after the attribute declaration, not before Thu Sep 26 11:33:28 CEST 2002 Daniel Veillard * python/generator.py python/libxml2class.txt: fixed a stupid error breaking the python API Thu Sep 26 00:31:46 CEST 2002 Daniel Veillard * trio.c trio.h triodef.h trionan.c trionan.h triop.h triostr.c triostr.h: applied a trio update patch from Bjorn Reese which should work with MinGW Thu Sep 26 00:21:18 CEST 2002 Daniel Veillard * tree.c: improving some documentation comments * xmlregexp.c: found and fixed a mem leak with python regression tests * doc/*: rebuilt the doc and the API XML file including the xmlregexp.h xmlautomata.h and xmlunicode.h headers * python/generator.py python/libxml2class.txt python/libxml_wrap.h python/types.c: added access to the XML Schemas regexps from python * python/tests/Makefile.am python/tests/regexp.py: added a simple regexp bindings test Tue Sep 24 08:10:48 MDT 2002 John Fleck * doc/xml.html: fixing ftp links - thanks to Vitaly Ostanin Tue Sep 24 16:08:17 CEST 2002 Daniel Veillard * xmlregexp.c: fixed the data callback on transition functionality which was broken when using the compact form * result/schemas/*: updated the results, less verbose, all tests pass like before * DOCBparser.c testAutomata.c testC14N.c testSchemas.c testThreads.c testXPath.c valid.c xinclude.c xmllint.c xmlregexp.c xmlschemas.c xmlschemastypes.c xpath.c python/libxml.c: removed a bunch of annoying warnings * xpath.c: try to provide better error report when possible Sat Sep 21 14:56:37 CEST 2002 Daniel Veillard * Makefile.am: fixed a breakage raised by Jacob Fri Sep 20 20:08:18 CEST 2002 Igor Zlatkovic * include/win32config.h: added HAVE_ERRNO_H definition for parts which don't use sockets Fri Sep 20 18:40:50 CEST 2002 Igor Zlatkovic * win32/Makefile.msvc: applied zlib patch from Daniel Gehriger * win32/configure.js: applied zlib patch from Daniel Gehriger Fri Sep 20 15:40:14 CEST 2002 Igor Zlatkovic * win32/configure.js: applied the patch from Mark Vakoc for regexp support * win32/libxml2.def.src: applied the patch from Mark Vakoc for regexp support Fri Sep 20 15:35:33 CEST 2002 Daniel Veillard * xmlschemastypes.c: as pointed by Igor Float and Double parsing ain't finished yet Fri Sep 20 14:00:16 CEST 2002 Daniel Veillard * Makefile.am configure.in: trying to fix #88412 by bypassing all the python subdir if python ain't detected Thu Sep 19 21:46:53 CEST 2002 Daniel Veillard * Makefile.am configure.in include/libxml/xmlversion.h.in: made configuring with regexps/automata/unicode the default but without schemas ATM * testRegexp.c valid.c xmlregexp.c include/libxml/xmlregexp.h: fixed the regexp based DTD validation performance and memory problem by switching to a compact form for determinist regexps and detecting the determinism property in the process. Seems as fast as the old DTD validation specific engine :-) despite the regexp built and compaction process. Wed Sep 18 18:27:26 CEST 2002 Daniel Veillard * valid.c: determinism is debugged, new DTD checking code now works but xmlFAComputesDeterminism takes far too much CPU and the whole set usues too much memory to be really usable as-is Wed Sep 18 00:54:30 CEST 2002 Daniel Veillard * tree.c: fixed another stupid bug in xmlGetNodePath() * xmllint.c: --version now report the options compiled in Tue Sep 17 23:48:07 CEST 2002 Daniel Veillard * HTMLparser.c: small cleanup * valid.c xmlregexp.c: switched DTD validation to use only regexp when configured with them. A bit of debugging around the determinism checks is still needed Tue Sep 17 21:22:25 CEST 2002 Daniel Veillard * python/libxml_wrap.h: stupid bug found by mattam@netcourrier.com Tue Sep 17 19:58:26 CEST 2002 Daniel Veillard * xmlIO.c: small portability glitch fixed. Mon Sep 17 12:38:08 CEST 2002 Daniel Veillard * xmlschemastypes.c: incomplete steps for real/double support * testAutomata.c include/libxml/xmlautomata.h include/libxml/xmlregexp.h: avoiding a compilation problem * valid.c include/libxml/valid.h: starting the work toward using the regexps for actual DTD validation Fri Sep 13 16:46:14 CEST 2002 Daniel Veillard * hash.c: cosmetic cleanup * valid.c include/libxml/tree.h include/libxml/valid.h: started integrating a DTD validation layer based on the regexps Thu Sep 12 18:01:29 CEST 2002 Daniel Veillard * xmlregexp.c xmlschemas.c: fixed a bug reported by Jeff Goff, the determinism was tested before eliminating the epsilon transitions :-( Thu Sep 12 16:57:45 CEST 2002 Daniel Veillard * python/generator.py python/libxml.c python/libxml.py python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: updated the python bindings, added code for easier File I/O, and the ability to define a resolver from Python fixing bug #91635 * python/tests/Makefile.am python/tests/inbuf.py python/tests/outbuf.py python/tests/pushSAXhtml.py python/tests/resolver.py python/tests/serialize.py: updated and augmented the set of Python tests. Tue Sep 10 21:05:28 CEST 2.~LIBXML2-2_6_13.bck7wE)[TOOLS.LIBSRC.libxml2-2_6_13]ChangeLog.;1'|002 Igor Zlatkovic * win32/configure.js: added more readme info for the binary package. Tue Sep 10 14:15:18 CEST 2002 Daniel Veillard * xmlIO.c: fixed a stupid out of bound array error Tue Sep 10 13:09:14 CEST 2002 Daniel Veillard * include/libxml/xmlIO.h xmlIO.c parser.c HTMLparser.c DOCBparser.c: messing around with support for Windows path, cleanups, trying to identify and fix the various code path to the filename access. Added xmlNormalizeWindowsPath() Thu Sep 5 16:19:18 CEST 2002 Daniel Veillard * error.c valid.c: working on better error reporting of validity errors, especially providing an accurate context. * result/valid/xlink.xml.err result/valid/rss.xml.err: better error reports in those cases. Thu Sep 5 13:29:47 CEST 2002 Daniel Veillard * DOCBparser.c HTMLparser.c c14n.c entities.c list.c parser.c parserInternals.c xmlIO.c: get rid of all the perror() calls made in the library execution paths. This should fix both #92059 and #92385 Thu Sep 5 13:13:17 CEST 2002 Daniel Veillard * xmllint.c: memory leak reporting was broken after a change of the preprocessor symbol used to activate it. Thu Sep 5 13:10:57 CEST 2002 Daniel Veillard * tree.c: try to make the copy function work for node of type XML_DOCUMENT_FRAG_NODE, they are only created by the DOM layers though, not libxml2 itself. Thu Sep 5 12:57:38 CEST 2002 Daniel Veillard * valid.c: try to provide file and line informations, not all messages are covered, but it's a (good) start Thu Sep 5 12:49:35 CEST 2002 Daniel Veillard * xinclude.c: reimplemented a large part of the XInclude processor, trying to minimize resources used, James Henstridge provided a huge test case which was exhibiting severe memory consumption problems. Thu Sep 5 10:07:13 CEST 2002 Daniel Veillard * python/Makefile.am: applied patch from Christophe Merlet to reestablish DESTDIR Wed Sep 4 14:13:34 CEST 2002 Daniel Veillard * libxml.spec.in: fixes libary path for x86_64 AMD Tue Sep 3 21:14:19 MDT 2002 John Fleck * doc/tutorial/includekeyword.c * doc/tutorial/xmltutorial.xml: (plus resulting generated html files) fixing one spot I missed in the tutorial where I hadn't freed memory properly Sat Aug 31 19:31:17 MDT 2002 John Fleck * doc/tutorial/includeaddattribute.c * doc/tutorial/includeaddkeyword.c * doc/tutorial/includegetattribute.c * doc/tutorial/includekeyword.c * doc/tutorial/xmltutorial.xml * doc/tutorial/*.html: update tutorial to properly free memory (thanks to Christopher R. Harris for pointing out that this needs to be done) * doc/tutorial/images/callouts/*.png: added image files so the callouts are graphical, making it easier to read ( use "--param callout.graphics 1" to generate html with graphical callouts) Wed Aug 28 13:44:54 CEST 2002 Daniel Veillard * doc/Libxml2-Logo-180x168.gif doc/Libxml2-Logo-90x34.gif: nice logos generated by Marc Liyanage * doc/site.xsl *.html: changed the stylesheet to show the new logo and regenerated the pages Sun Aug 25 16:38:05 CEST 2002 Daniel Veillard * xmlIO.c: handle Windows sepecific file://localhost/ semantic ... Thu Aug 22 22:03:19 CEST 2002 Daniel Veillard * xpath.c: possible mem leak patch from Jason Adams Thu Aug 22 17:27:30 CEST 2002 Daniel Veillard * xpath.c: integrated xf:escape-uri() from Wesley Terpstra in the XQuery namespace * configure.in: preparing 2.4.24 * doc/*.html: updated the web pages Thu Aug 22 16:19:42 CEST 2002 Daniel Veillard * python/generator.py: closing bug #85258 by generating conditional compile check to avoid linking to routines not configured in. 2002-08-22 Havoc Pennington * autogen.sh: update error message for missing automake Thu Aug 22 11:45:50 CEST 2002 Daniel Veillard * python/Makefile.am: typo in target name resulted in libxml2.py to not be rebuilt. fixed DESTDIR similary to the libxslt one. Thu Aug 22 09:15:00 CEST 2002 Daniel Veillard * win32/win32/Makefile.mingw: updated with version from Elizabeth Barham at http://soggytrousers.net/repository/ Tue Aug 20 16:40:48 CEST 2002 Igor Zlatkovic * win32/Makefile.msvc: added the prefix location to the include and lib search path. 2002-08-18 Havoc Pennington * autogen.sh: hardcode aclocal-1.4/automake-1.4 so that users with both automake 1.6 and 1.4 installed get the right automake. Means compilation from CVS will now require the latest automake 1.4 release, or manually creating symlinks called "automake-1.4" and "aclocal-1.4" Wed Aug 14 18:54:19 CEST 2002 Daniel Veillard * configure.in python/Makefile.am: more AMD 64 induced changes from Frederic Crozat Wed Aug 14 16:43:53 CEST 2002 Daniel Veillard * xinclude.c: oops I was missing the xml:base fixup too * result/XInclude/*.xml: this adds xml:base attributes to most results of the tests Wed Aug 14 16:05:37 CEST 2002 Daniel Veillard * xinclude.c: quick but apparently working implementation of xi:fallback, should close bug #89684 * Makefile.am test/XInclude/docs/fallback.xml result/XInclude/fallback.xml: added a basic test for fallback, and run with --nowarning to avoid a spurious warning * configure.in: applied patch from Frederic Crozat for python bindings on AMD 64bits machines. Wed Aug 14 10:47:46 CEST 2002 Daniel Veillard * parser.c: xmlSAXUserParseMemory() really ought to fail if the caller don't pass a SAX callback block. Wed Aug 14 10:29:02 CEST 2002 Daniel Veillard * tree.c: applied the same fix for the XML-1.0 namespace to xmlSearchNsByHref() as was done for xmlSearchNs() Mon Aug 12 16:52:08 CEST 2002 Daniel Veillard * libxml.3: small cleanup of the man page * HTMLtree.c: fixed a potential problem raised by Petr Vandrovec when serializing HREF attributes generated by XSLT. Mon Aug 12 15:24:05 CEST 2002 Daniel Veillard * HTMLtree.c include/libxml/HTMLtree.h: integrated a cleaned up version of Marc Liyanage' patch for boolean attributes in HTML output Mon Aug 12 14:11:59 CEST 2002 Daniel Veillard * python/tests/serialize.py: fixed the test results, indenting behaviour changed slightly Thu Aug 8 11:00:26 2002 Aleksey Sanin * win32/dsp/libxml2.def.src win32/libxml2.def.src: added new c14n function to Windows def files Fri Aug 2 16:46:46 2002 Aleksey Sanin * c14n.c: fixed a memory leak in c14n code Sat Aug 3 00:15:06 CEST 2002 Daniel Veillard * parser.c include/libxml/parser.h: adding a new API for Christian Glahn: xmlParseBalancedChunkMemoryRecover * valid.c: patch from Rick Jones for some grammar cleanup in validation messages * result/VC/* result/valid/*: this slightly change some of the regression tests outputs Thu Aug 1 14:50:28 CEST 2002 Daniel Veillard * tree.c: trying to fix a problem in namespaced attribute handling raised by Christian Glahn Thu Aug 1 12:17:30 CEST 2002 Daniel Veillard * encoding.c include/libxml/encoding.h: Opening the interface xmlNewCharEncodingHandler as requested in #89415 * python/generator.py python/setup.py.in: applied cleanup patches from Marc-Andre Lemburg * tree.c: fixing bug #89332 on a specific case of loosing the XML-1.0 namespace on xml:xxx attributes Wed Jul 31 23:27:42 2002 Aleksey Sanin * c14n.c include/libxml/c14n.h: fixed one more c14n + namespaces corner case from new Merlin's test suite and added a callback that will be used to improve xmlsec performance Mon Jul 29 18:22:00 CEST 2002 Daniel Veillard * HTMLtree.c: trying to fix the